mirror of https://github.com/axmolengine/axmol.git
This commit is contained in:
parent
4c05ca5004
commit
865c1e22ac
|
@ -163,12 +163,10 @@ cocos2d::TrianglesCommand* SkeletonBatch::addCommand(cocos2d::Renderer* renderer
|
|||
CCASSERT(programState, "programState should not be null");
|
||||
|
||||
auto& pipelinePS = command->getPipelineDescriptor().programState;
|
||||
if (pipelinePS != programState)
|
||||
if (pipelinePS == nullptr || pipelinePS->getProgram() != programState->getProgram())
|
||||
{
|
||||
CC_SAFE_RELEASE(pipelinePS);
|
||||
pipelinePS = programState;
|
||||
CC_SAFE_RETAIN(pipelinePS);
|
||||
|
||||
pipelinePS = programState->clone();
|
||||
updateProgramStateLayout(pipelinePS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue