mirror of https://github.com/axmolengine/axmol.git
migrate particleBatchNode to director matrix stack
This commit is contained in:
parent
c593938ed2
commit
dd4d45ea90
|
@ -140,14 +140,16 @@ void ParticleBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform,
|
||||||
_transformUpdated = false;
|
_transformUpdated = false;
|
||||||
|
|
||||||
// IMPORTANT:
|
// IMPORTANT:
|
||||||
// To ease the migration to v3.0, we still support the kmGL stack,
|
// To ease the migration to v3.0, we still support the kmMat4 stack,
|
||||||
// but it is deprecated and your code should not rely on it
|
// but it is deprecated and your code should not rely on it
|
||||||
kmGLPushMatrix();
|
Director* director = Director::getInstance();
|
||||||
kmGLLoadMatrix(&_modelViewTransform);
|
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
|
||||||
|
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
|
||||||
|
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);
|
||||||
|
|
||||||
draw(renderer, _modelViewTransform, dirty);
|
draw(renderer, _modelViewTransform, dirty);
|
||||||
|
|
||||||
kmGLPopMatrix();
|
director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
// override addChild:
|
// override addChild:
|
||||||
|
|
Loading…
Reference in New Issue