@Override public void glClearDepthf (float depth) { calls++; gl20.glClearDepthf(depth); check(); }
@Override public void glClearDepthf (float depth) { calls++; gl20.glClearDepthf(depth); check(); }
@Override public void glClearDepth(float depth) { Gdx.gl.glClearDepthf(depth); }
@Override public void glClearDepthf (float depth) { calls++; gl20.glClearDepthf(depth); check(); }
private void clear () { gl.glClearDepthf(1); gl.glClearColor(0, 0, 0, 0); gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); }
/** Clear the specified buffer. */ public static void clear (FrameBuffer buffer, Color clearColor, float clearDepth, boolean useDepth) { Gdx.gl20.glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a); buffer.begin(); { if (useDepth) { Gdx.gl20.glClearDepthf(clearDepth); Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); } else { Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT); } } buffer.end(); }
/** Starts capturing the scene, clears the buffer with the clear color specified by {@link #setClearColor(Color)} or * {@link #setClearColor(float r, float g, float b, float a)}. * * @return true or false, whether or not capturing has been initiated. Capturing will fail in case there are no enabled effects * in the chain or this instance is not enabled or capturing is already started. */ public boolean capture () { hasCaptured = false; if (enabled && !capturing) { if (buildEnabledEffectsList() == 0) { // no enabled effects // Gdx.app.log( "PostProcessor::capture()", // "No post-processor effects enabled" ); return false; } capturing = true; composite.begin(); composite.capture(); if (useDepth) { Gdx.gl.glClearDepthf(clearDepth); } Gdx.gl.glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a); Gdx.gl.glClear(clearBits); return true; } return false; }
/** * Ends rendering */ private void endRendering() { if (rendering) { if(!renderingStage) { undoTransformations(); spriteBatch.end(); if (renderingShapes) { shapeRenderer.end(); } if (clip != null) { Gdx.gl.glClearDepthf(1f); Gdx.gl.glClear(GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glDisable(GL20.GL_DEPTH_TEST); } } } rendering = false; renderingShapes = false; }
/** Starts capturing the scene, clears the buffer with the clear color specified by {@link #setClearColor(Color)} or * {@link #setClearColor(float r, float g, float b, float a)}. * * @return true or false, whether or not capturing has been initiated. Capturing will fail in case there are no enabled effects * in the chain or this instance is not enabled or capturing is already started. */ public boolean capture () { hasCaptured = false; if (enabled && !capturing) { if (buildEnabledEffectsList() == 0) { // no enabled effects // Gdx.app.log( "PostProcessor::capture()", // "No post-processor effects enabled" ); return false; } capturing = true; composite.begin(); composite.capture(); if (useDepth) { Gdx.gl.glClearDepthf(clearDepth); } Gdx.gl.glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a); Gdx.gl.glClear(clearBits); return true; } return false; }
/** Starts capturing the scene, clears the buffer with the clear color specified by {@link #setClearColor(Color)} or * {@link #setClearColor(float r, float g, float b, float a)}. * * @return true or false, whether or not capturing has been initiated. Capturing will fail in case there are no enabled effects * in the chain or this instance is not enabled or capturing is already started. */ public boolean capture () { hasCaptured = false; if (enabled && !capturing) { if (buildEnabledEffectsList() == 0) { // no enabled effects // Gdx.app.log( "PostProcessor::capture()", // "No post-processor effects enabled" ); return false; } capturing = true; composite.begin(); composite.capture(); if (useDepth) { Gdx.gl.glClearDepthf(clearDepth); } Gdx.gl.glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a); Gdx.gl.glClear(clearBits); return true; } return false; }
void renderWithShaders() { if( shadows || blur ) { lightMap.frameBuffer.begin(); Gdx.gl20.glClearColor( 0, 0, 0, 0 ); if( depthMasking ) { Gdx.gl20.glClearDepthf( 1 ); Gdx.gl20.glClear( GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT ); } else { Gdx.gl20.glClear( GL20.GL_COLOR_BUFFER_BIT ); } } lightShader.begin(); { lightShader.setUniformMatrix( "u_projTrans", combined ); final Light[] list = lightList.items; for( int i = 0, size = lightList.size; i < size; i++ ) { list[i].render(); } } lightShader.end(); if( shadows || blur ) { lightMap.frameBuffer.end(); } }
public void updateNormalDepthMap () { gl.glCullFace(GL20.GL_BACK); gl.glFrontFace(GL20.GL_CCW); gl.glEnable(GL20.GL_CULL_FACE); gl.glDisable(GL20.GL_BLEND); gl.glEnable(GL20.GL_DEPTH_TEST); gl.glDepthFunc(GL20.GL_LESS); gl.glDepthMask(true); setSsaoScale(DefaultSsaoScale); updateSsaoPlanes(); normalDepthMap.begin(); { gl.glClearDepthf(1f); gl.glClearColor(0, 0, 0, 1); gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); // renderAllMeshes(true); renderTilemapPlane(); renderCars(true); renderWalls(true); // if (staticMeshes.size() > 0) { // gl.glEnable(GL20.GL_DEPTH_TEST); // gl.glDepthFunc(GL20.GL_LESS); // // renderOrthographicAlignedModels(staticMeshes, true); // } renderTrees(true); } normalDepthMap.end(); }
applyTransformations(); Gdx.gl.glClearDepthf(1f); Gdx.gl.glClear(GL20.GL_DEPTH_BUFFER_BIT);