fix opengl 502 by using glGetBooleanv

This commit is contained in:
Huabing.Xu 2015-01-16 15:21:23 +08:00
parent 1ac5811bd8
commit 19bb6a0c68
1 changed files with 4 additions and 1 deletions

View File

@ -318,7 +318,10 @@ void Grid3D::beforeBlit()
if(_needDepthTestForBlit)
{
_oldDepthTestValue = glIsEnabled(GL_DEPTH_TEST);
_oldDepthWriteValue = glIsEnabled(GL_DEPTH_WRITEMASK);
GLboolean depthWriteMask;
glGetBooleanv(GL_DEPTH_WRITEMASK, &depthWriteMask);
_oldDepthWriteValue = depthWriteMask;
CHECK_GL_ERROR_DEBUG();
glEnable(GL_DEPTH_TEST);
glDepthMask(true);
}