MapRenderer: disable writes to stencil- and depth-buffer by default

This commit is contained in:
Hannes Janetzek 2014-01-29 03:10:25 +01:00
parent bc28e0ed11
commit a0111e09b7

View File

@ -220,12 +220,18 @@ public class MapRenderer {
mUpdateColor = false; mUpdateColor = false;
} }
// some GL implementation do not clear these
// buffers unless writes are enabled.
GL.glDepthMask(true); GL.glDepthMask(true);
GL.glStencilMask(0xFF); GL.glStencilMask(0xFF);
GL.glClear(GL20.GL_COLOR_BUFFER_BIT GL.glClear(GL20.GL_COLOR_BUFFER_BIT
| GL20.GL_DEPTH_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT
| GL20.GL_STENCIL_BUFFER_BIT); | GL20.GL_STENCIL_BUFFER_BIT);
GL.glDepthMask(false);
GL.glStencilMask(0);
GLState.blend(false); GLState.blend(false);
GLState.bindTex2D(-1); GLState.bindTex2D(-1);
GLState.useProgram(-1); GLState.useProgram(-1);