GRIM: Don't draw to the depth buffer when creating the stencil mask for shadows.

This commit is contained in:
Joni Vähämäki 2011-07-15 05:26:53 +08:00 committed by Giulio Camuffo
parent 244e273050
commit 2519700f0c

View file

@ -365,6 +365,7 @@ void GfxOpenGL::drawShadowPlanes() {
}
*/
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
glDepthMask(GL_FALSE);
glClearStencil(~0);
glClear(GL_STENCIL_BUFFER_BIT);
@ -383,6 +384,7 @@ void GfxOpenGL::drawShadowPlanes() {
glEnd();
}
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDepthMask(GL_TRUE);
glStencilFunc(GL_EQUAL, 1, (GLuint)~0);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);