aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-11-03 09:55:52 +0100
committerArisotura <thetotalworm@gmail.com>2019-11-03 09:55:52 +0100
commitc064f738ea55502a6aa2babf8e56ce915cffb80e (patch)
treed9e519c995d22178f104dee65cd98346a0bb8ea3
parentb641ccaf35b68cfe465257c57cb2a6dda039bc46 (diff)
OpenGL: fix bug when rendering translucent polygons coming after shadow polygons, against a zero-alpha clear-plane (would use wrong shader, resulting in broken transparency)
-rw-r--r--src/GPU3D_OpenGL.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/GPU3D_OpenGL.cpp b/src/GPU3D_OpenGL.cpp
index d616e1c..6abb1ab 100644
--- a/src/GPU3D_OpenGL.cpp
+++ b/src/GPU3D_OpenGL.cpp
@@ -807,7 +807,6 @@ void RenderSceneChunk(int y, int h)
else
glBlendFuncSeparate(GL_ONE, GL_ZERO, GL_ONE, GL_ONE);
- UseRenderShader(flags | RenderFlag_Trans);
glLineWidth(1.0);
if (NumOpaqueFinalPolys > -1)
@@ -843,6 +842,8 @@ void RenderSceneChunk(int y, int h)
}
else if (rp->PolyData->Translucent)
{
+ UseRenderShader(flags | RenderFlag_Trans);
+
// zorp
glDepthFunc(GL_LESS);