Fix depth issues in multiple games

This commit is contained in:
raven02 2013-07-14 02:56:48 +08:00
parent 8eab028383
commit bee66bdb4d

View File

@ -221,7 +221,7 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
if (gstate.isDepthTestEnabled()) {
glstate.depthTest.enable();
glstate.depthFunc.set(GL_ALWAYS);
glstate.depthWrite.set(depthMask ? GL_TRUE : GL_FALSE);
glstate.depthWrite.set(depthMask || !gstate.isFogEnabled() || !gstate.isDepthWriteEnabled() ? GL_TRUE : GL_FALSE);
} else {
glstate.depthTest.enable();
glstate.depthFunc.set(GL_ALWAYS);