1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Enable GL_DEPTH_CLAMP when z-buffer is off.

Fixed 2D in several games, e.g.  WCW Backstage Assault
This commit is contained in:
Sergey Lipskiy 2014-11-07 11:15:59 +06:00
parent 3106db8614
commit e24abc346e

View File

@ -552,10 +552,14 @@ void OGLRender::_updateStates() const
glDisable( GL_DEPTH_TEST );
glDepthMask( FALSE );
} else {
if ((gSP.geometryMode & G_ZBUFFER) || gDP.otherMode.depthSource == G_ZS_PRIM)
glEnable( GL_DEPTH_TEST );
else
glDisable( GL_DEPTH_TEST );
if ((gSP.geometryMode & G_ZBUFFER) || gDP.otherMode.depthSource == G_ZS_PRIM) {
glEnable(GL_DEPTH_TEST);
glDisable(GL_DEPTH_CLAMP);
}
else {
glDisable(GL_DEPTH_TEST);
glEnable(GL_DEPTH_CLAMP);
}
if ((gDP.changed & CHANGED_RENDERMODE) > 0) {
if (gDP.otherMode.depthCompare)