如题,cocos2dx 4.0目前是否不支持ExportJson文件的加载,是否有可以将该文件格式转换的工具。崩溃代码位于TrianglesCommand.cpp
_pipelineDescriptor.programState 该成员变量为空指针。
void TrianglesCommand::init(float globalOrder, Texture2D* texture, const BlendFunc& blendType, const Triangles& triangles, const Mat4& mv, uint32_t flags)
{
RenderCommand::init(globalOrder, mv, flags);
_triangles = triangles;
if(_triangles.indexCount % 3 != 0)
{
unsigned int count = _triangles.indexCount;
_triangles.indexCount = count / 3 * 3;
CCLOGERROR("Resize indexCount from %d to %d, size must be multiple times of 3", count, _triangles.indexCount);
}
_mv = mv;
if (_programType != _pipelineDescriptor.programState->getProgram()->getProgramType() ||
_texture != texture->getBackendTexture() ||
_blendType != blendType)
{
_programType = _pipelineDescriptor.programState->getProgram()->getProgramType();
_texture = texture->getBackendTexture();
_blendType = blendType;
//since it would be too expensive to check the uniforms, simplify enable batching for built-in program.
if(_programType == backend::ProgramType::CUSTOM_PROGRAM)
setSkipBatching(true);
//TODO: minggo set it in Node?
auto& blendDescriptor = _pipelineDescriptor.blendDescriptor;
blendDescriptor.blendEnabled = true;
blendDescriptor.sourceRGBBlendFactor = blendDescriptor.sourceAlphaBlendFactor = blendType.src;
blendDescriptor.destinationRGBBlendFactor = blendDescriptor.destinationAlphaBlendFactor = blendType.dst;
if(!isSkipBatching())
generateMaterialID();
}
}