@Override public void glDepthMask (boolean flag) { calls++; gl20.glDepthMask(flag); check(); }
@Override public void afterGroup (int group) { if (group == GROUP_BLEND) { Gdx.gl.glDepthMask(true); Gdx.gl.glDisable(GL20.GL_BLEND); } }
@Override public void afterGroup (int group) { if (group == GROUP_BLEND) { Gdx.gl.glDepthMask(true); Gdx.gl.glDisable(GL20.GL_BLEND); } }
@Override public void glDepthMask (boolean flag) { calls++; gl20.glDepthMask(flag); check(); }
@Override public void begin () { if (drawing) throw new IllegalStateException("SpriteBatch.end must be called before begin."); renderCalls = 0; Gdx.gl.glDepthMask(false); if (customShader != null) customShader.begin(); else shader.begin(); setupMatrices(); drawing = true; }
/** Completes rendering for this SpriteCache. */ public void end () { if (!drawing) throw new IllegalStateException("begin must be called before end."); drawing = false; shader.end(); GL20 gl = Gdx.gl20; gl.glDepthMask(true); if (customShader != null) mesh.unbind(customShader); else mesh.unbind(shader); }
/** Completes rendering for this SpriteCache. */ public void end () { if (!drawing) throw new IllegalStateException("begin must be called before end."); drawing = false; shader.end(); GL20 gl = Gdx.gl20; gl.glDepthMask(true); if (customShader != null) mesh.unbind(customShader); else mesh.unbind(shader); }
@Override public void begin () { if (drawing) throw new IllegalStateException("PolygonSpriteBatch.end must be called before begin."); renderCalls = 0; Gdx.gl.glDepthMask(false); if (customShader != null) customShader.begin(); else shader.begin(); setupMatrices(); drawing = true; }
@Override public void begin () { if (drawing) throw new IllegalStateException("SpriteBatch.end must be called before begin."); renderCalls = 0; Gdx.gl.glDepthMask(false); if (customShader != null) customShader.begin(); else shader.begin(); setupMatrices(); drawing = true; }
@Override public void begin () { if (drawing) throw new IllegalStateException("PolygonSpriteBatch.end must be called before begin."); renderCalls = 0; Gdx.gl.glDepthMask(false); if (customShader != null) customShader.begin(); else shader.begin(); setupMatrices(); drawing = true; }
@Override public void beforeGroup (int group, Array<Decal> contents) { if (group == GROUP_BLEND) { Sort.instance().sort(contents, comparator); Gdx.gl.glEnable(GL20.GL_BLEND); // no need for writing into the z buffer if transparent decals are the last thing to be rendered // and they are rendered back to front Gdx.gl.glDepthMask(false); } else { // FIXME sort by material } }
@Override public void beforeGroup (int group, Array<Decal> contents) { if (group == GROUP_BLEND) { Sort.instance().sort(contents, comparator); Gdx.gl.glEnable(GL20.GL_BLEND); // no need for writing into the z buffer if transparent decals are the last thing to be rendered // and they are rendered back to front Gdx.gl.glDepthMask(false); } else { // FIXME sort by material } }
/** Resets all changed OpenGL states to their defaults. */ public void end () { if (depthFunc != 0) Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); if (!depthMask) Gdx.gl.glDepthMask(true); if (blending) Gdx.gl.glDisable(GL20.GL_BLEND); if (cullFace > 0) Gdx.gl.glDisable(GL20.GL_CULL_FACE); textureBinder.end(); }
/** Sets up the render context, must be matched with a call to {@link #end()}. */ public void begin () { Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); depthFunc = 0; Gdx.gl.glDepthMask(true); depthMask = true; Gdx.gl.glDisable(GL20.GL_BLEND); blending = false; Gdx.gl.glDisable(GL20.GL_CULL_FACE); cullFace = blendSFactor = blendDFactor = 0; textureBinder.begin(); }
/** Resets all changed OpenGL states to their defaults. */ public void end () { if (depthFunc != 0) Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); if (!depthMask) Gdx.gl.glDepthMask(true); if (blending) Gdx.gl.glDisable(GL20.GL_BLEND); if (cullFace > 0) Gdx.gl.glDisable(GL20.GL_CULL_FACE); textureBinder.end(); }
/** Sets up the render context, must be matched with a call to {@link #end()}. */ public void begin () { Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); depthFunc = 0; Gdx.gl.glDepthMask(true); depthMask = true; Gdx.gl.glDisable(GL20.GL_BLEND); blending = false; Gdx.gl.glDisable(GL20.GL_CULL_FACE); cullFace = blendSFactor = blendDFactor = 0; textureBinder.begin(); }
@Override public void end () { if (!drawing) throw new IllegalStateException("PolygonSpriteBatch.begin must be called before end."); if (vertexIndex > 0) flush(); lastTexture = null; drawing = false; GL20 gl = Gdx.gl; gl.glDepthMask(true); if (isBlendingEnabled()) gl.glDisable(GL20.GL_BLEND); if (customShader != null) customShader.end(); else shader.end(); }
@Override public void end () { if (!drawing) throw new IllegalStateException("SpriteBatch.begin must be called before end."); if (idx > 0) flush(); lastTexture = null; drawing = false; GL20 gl = Gdx.gl; gl.glDepthMask(true); if (isBlendingEnabled()) gl.glDisable(GL20.GL_BLEND); if (customShader != null) customShader.end(); else shader.end(); }
@Override public void end () { if (!drawing) throw new IllegalStateException("SpriteBatch.begin must be called before end."); if (idx > 0) flush(); lastTexture = null; drawing = false; GL20 gl = Gdx.gl; gl.glDepthMask(true); if (isBlendingEnabled()) gl.glDisable(GL20.GL_BLEND); if (customShader != null) customShader.end(); else shader.end(); }
@Override public void end () { if (!drawing) throw new IllegalStateException("PolygonSpriteBatch.begin must be called before end."); if (vertexIndex > 0) flush(); lastTexture = null; drawing = false; GL20 gl = Gdx.gl; gl.glDepthMask(true); if (isBlendingEnabled()) gl.glDisable(GL20.GL_BLEND); if (customShader != null) customShader.end(); else shader.end(); }