@Override public void afterGroup (int group) { if (group == GROUP_BLEND) { Gdx.gl.glDisable(GL20.GL_BLEND); } }
@Override public void afterGroup (int group) { if (group == GROUP_BLEND) { Gdx.gl.glDisable(GL20.GL_BLEND); } }
@Override public void afterGroups () { Gdx.gl.glDisable(GL20.GL_TEXTURE_2D); }
/** 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 afterGroups () { shader.end(); Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); }
@Override public void glDisable (int cap) { calls++; gl20.glDisable(cap); check(); }
@Override public void afterGroups () { shader.end(); Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); }
@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 glDisable (int cap) { calls++; gl20.glDisable(cap); check(); }
protected void endPass1 () { allocator.end(); Gdx.gl.glDisable(GL20.GL_SCISSOR_TEST); } }
public void end () { Gdx.gl.glDisable(GL20.GL_SCISSOR_TEST); fbo.end(); }
public void setCullFace (final int face) { if (face != cullFace) { cullFace = face; if ((face == GL20.GL_FRONT) || (face == GL20.GL_BACK) || (face == GL20.GL_FRONT_AND_BACK)) { Gdx.gl.glEnable(GL20.GL_CULL_FACE); Gdx.gl.glCullFace(face); } else Gdx.gl.glDisable(GL20.GL_CULL_FACE); } } }
public void setCullFace (final int face) { if (face != cullFace) { cullFace = face; if ((face == GL20.GL_FRONT) || (face == GL20.GL_BACK) || (face == GL20.GL_FRONT_AND_BACK)) { Gdx.gl.glEnable(GL20.GL_CULL_FACE); Gdx.gl.glCullFace(face); } else Gdx.gl.glDisable(GL20.GL_CULL_FACE); } } }
public void render (boolean update) { fpsCounter.put(Gdx.graphics.getFramesPerSecond()); if (update) update(); beginRender(true); renderWorld(); Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); if (debugMode != DebugDrawModes.DBG_NoDebug) world.setDebugMode(debugMode); Gdx.gl.glEnable(GL20.GL_DEPTH_TEST); performance.setLength(0); performance.append("FPS: ").append(fpsCounter.value).append(", Bullet: ") .append((int)(performanceCounter.load.value * 100f)).append("%"); }
/** Pops the current scissor rectangle from the stack and sets the new scissor area to the new top of stack rectangle. In case * no more rectangles are on the stack, {@link GL20#GL_SCISSOR_TEST} is disabled. * <p> * Any drawing should be flushed before popping scissors. */ public static Rectangle popScissors () { Rectangle old = scissors.pop(); if (scissors.size == 0) Gdx.gl.glDisable(GL20.GL_SCISSOR_TEST); else { Rectangle scissor = scissors.peek(); HdpiUtils.glScissor((int)scissor.x, (int)scissor.y, (int)scissor.width, (int)scissor.height); } return old; }
@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(); }