OSDN Git Service

Fix depth test
authorXoppa <contact@xoppa.nl>
Sun, 11 Aug 2013 23:49:37 +0000 (01:49 +0200)
committerXoppa <contact@xoppa.nl>
Sun, 11 Aug 2013 23:49:37 +0000 (01:49 +0200)
gdx/src/com/badlogic/gdx/graphics/g3d/utils/RenderContext.java

index dd32201..d330dc5 100644 (file)
@@ -66,9 +66,9 @@ public class RenderContext {
                                Gdx.gl.glDepthFunc(depthFunc = depthFunction);
                        if (!wasEnabled || this.depthRangeNear != depthRangeNear || this.depthRangeFar != depthRangeFar)
                                Gdx.gl.glDepthRangef(this.depthRangeNear = depthRangeNear, this.depthRangeFar = depthRangeFar);
-                       if (!wasEnabled || this.depthMask != depthMask)
-                               Gdx.gl.glDepthMask(this.depthMask = depthMask);
                }
+               if (this.depthMask != depthMask)
+                       Gdx.gl.glDepthMask(this.depthMask = depthMask);
        }
        
        public final void setBlending(final boolean enabled, final int sFactor, final int dFactor) {