OpenGL Renderer: Allow all opaque non-shadow polygons to write to the depth buffer, making polygon opacity a priority state.

Fixes issue #13. (Regression from r5372.)
This commit is contained in:
rogerman 2016-12-16 13:00:32 -08:00
parent efcdd320f8
commit 49309fb053
2 changed files with 3 additions and 3 deletions

View File

@ -3026,7 +3026,7 @@ Render3DError OpenGLRenderer_1_2::SetupPolygon(const POLY &thePoly)
{
glDisable(GL_STENCIL_TEST);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
enableDepthWrite = (!attr.isTranslucent || ( (attr.polygonMode == POLYGON_MODE_DECAL) && attr.isOpaque ) || attr.enableAlphaDepthWrite) ? GL_TRUE : GL_FALSE;
enableDepthWrite = (!attr.isTranslucent || attr.isOpaque || attr.enableAlphaDepthWrite) ? GL_TRUE : GL_FALSE;
}
else
{
@ -4628,7 +4628,7 @@ Render3DError OpenGLRenderer_2_0::SetupPolygon(const POLY &thePoly)
{
glDisable(GL_STENCIL_TEST);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
enableDepthWrite = (!attr.isTranslucent || ( (attr.polygonMode == POLYGON_MODE_DECAL) && attr.isOpaque ) || attr.enableAlphaDepthWrite) ? GL_TRUE : GL_FALSE;
enableDepthWrite = (!attr.isTranslucent || attr.isOpaque || attr.enableAlphaDepthWrite) ? GL_TRUE : GL_FALSE;
}
else
{

View File

@ -1669,7 +1669,7 @@ Render3DError OpenGLRenderer_3_2::SetupPolygon(const POLY &thePoly)
{
glDisable(GL_STENCIL_TEST);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
enableDepthWrite = (!attr.isTranslucent || ( (attr.polygonMode == POLYGON_MODE_DECAL) && attr.isOpaque ) || attr.enableAlphaDepthWrite) ? GL_TRUE : GL_FALSE;
enableDepthWrite = (!attr.isTranslucent || attr.isOpaque || attr.enableAlphaDepthWrite) ? GL_TRUE : GL_FALSE;
}
else
{