Only set depth update flag when depth write is enabled

This commit is contained in:
raven02 2014-04-30 20:00:42 +08:00
parent 2b50fcb016
commit e0e1a6b217

View File

@ -401,7 +401,9 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
glstate.depthTest.enable();
glstate.depthFunc.set(ztests[gstate.getDepthTestFunction()]);
glstate.depthWrite.set(gstate.isDepthWriteEnabled() || alwaysDepthWrite ? GL_TRUE : GL_FALSE);
framebufferManager_->SetDepthUpdated();
if (gstate.isDepthWriteEnabled() || alwaysDepthWrite) {
framebufferManager_->SetDepthUpdated();
}
} else {
glstate.depthTest.disable();
}