mirror of https://github.com/axmolengine/axmol.git
remove kmGLFreeAll call
This commit is contained in:
parent
14f004b12a
commit
1b8e45fe19
|
@ -434,11 +434,31 @@ void Director::initMatrixStack()
|
||||||
kmMat4 identity;
|
kmMat4 identity;
|
||||||
kmMat4Identity(&identity);
|
kmMat4Identity(&identity);
|
||||||
|
|
||||||
|
while (!_modelViewMatrixStack.empty())
|
||||||
|
{
|
||||||
|
_modelViewMatrixStack.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
while (!_projectionMatrixStack.empty())
|
||||||
|
{
|
||||||
|
_projectionMatrixStack.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
while (!_textureMatrixStack.empty())
|
||||||
|
{
|
||||||
|
_textureMatrixStack.pop();
|
||||||
|
}
|
||||||
|
|
||||||
_modelViewMatrixStack.push(identity);
|
_modelViewMatrixStack.push(identity);
|
||||||
_projectionMatrixStack.push(identity);
|
_projectionMatrixStack.push(identity);
|
||||||
_textureMatrixStack.push(identity);
|
_textureMatrixStack.push(identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Director::resetMatrixStack()
|
||||||
|
{
|
||||||
|
initMatrixStack();
|
||||||
|
}
|
||||||
|
|
||||||
void Director::popMatrix(MATRIX_STACK_TYPE type)
|
void Director::popMatrix(MATRIX_STACK_TYPE type)
|
||||||
{
|
{
|
||||||
if(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW == type)
|
if(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW == type)
|
||||||
|
|
|
@ -106,6 +106,7 @@ public:
|
||||||
void loadMatrix(MATRIX_STACK_TYPE type, const kmMat4& mat);
|
void loadMatrix(MATRIX_STACK_TYPE type, const kmMat4& mat);
|
||||||
void multiplyMatrix(MATRIX_STACK_TYPE type, const kmMat4& mat);
|
void multiplyMatrix(MATRIX_STACK_TYPE type, const kmMat4& mat);
|
||||||
kmMat4 getMatrix(MATRIX_STACK_TYPE type);
|
kmMat4 getMatrix(MATRIX_STACK_TYPE type);
|
||||||
|
void resetMatrixStack();
|
||||||
public:
|
public:
|
||||||
static const char *EVENT_PROJECTION_CHANGED;
|
static const char *EVENT_PROJECTION_CHANGED;
|
||||||
static const char* EVENT_AFTER_UPDATE;
|
static const char* EVENT_AFTER_UPDATE;
|
||||||
|
|
|
@ -65,8 +65,7 @@ namespace GL {
|
||||||
|
|
||||||
void invalidateStateCache( void )
|
void invalidateStateCache( void )
|
||||||
{
|
{
|
||||||
kmGLFreeAll();
|
Director::getInstance()->resetMatrixStack();
|
||||||
|
|
||||||
s_currentProjectionMatrix = -1;
|
s_currentProjectionMatrix = -1;
|
||||||
s_vertexAttribPosition = false;
|
s_vertexAttribPosition = false;
|
||||||
s_vertexAttribColor = false;
|
s_vertexAttribColor = false;
|
||||||
|
|
Loading…
Reference in New Issue