@Override public void beforeGroups () { Gdx.gl.glEnable(GL20.GL_TEXTURE_2D); }
@Override public void beforeGroups () { Gdx.gl.glEnable(GL20.GL_TEXTURE_2D); }
@Override public void glEnable (int cap) { calls++; gl20.glEnable(cap); check(); }
@Override public void glEnable (int cap) { calls++; gl20.glEnable(cap); check(); }
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 setBlending (final boolean enabled, final int sFactor, final int dFactor) { if (enabled != blending) { blending = enabled; if (enabled) Gdx.gl.glEnable(GL20.GL_BLEND); else Gdx.gl.glDisable(GL20.GL_BLEND); } if (enabled && (blendSFactor != sFactor || blendDFactor != dFactor)) { Gdx.gl.glBlendFunc(sFactor, dFactor); blendSFactor = sFactor; blendDFactor = dFactor; } }
public void setBlending (final boolean enabled, final int sFactor, final int dFactor) { if (enabled != blending) { blending = enabled; if (enabled) Gdx.gl.glEnable(GL20.GL_BLEND); else Gdx.gl.glDisable(GL20.GL_BLEND); } if (enabled && (blendSFactor != sFactor || blendDFactor != dFactor)) { Gdx.gl.glBlendFunc(sFactor, dFactor); blendSFactor = sFactor; blendDFactor = dFactor; } }
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("%"); }
@Override public void beforeGroups () { Gdx.gl.glEnable(GL20.GL_DEPTH_TEST); shader.begin(); shader.setUniformMatrix("u_projectionViewMatrix", camera.combined); shader.setUniformi("u_texture", 0); }
protected void beginPass1 () { allocator.begin(); Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glEnable(GL20.GL_SCISSOR_TEST); }
@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 } }
@Override public void beforeGroups () { Gdx.gl.glEnable(GL20.GL_DEPTH_TEST); shader.begin(); shader.setUniformMatrix("u_projectionViewMatrix", camera.combined); shader.setUniformi("u_texture", 0); }
public void begin () { final int w = fbo.getWidth(); final int h = fbo.getHeight(); fbo.begin(); Gdx.gl.glViewport(0, 0, w, h); Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glEnable(GL20.GL_SCISSOR_TEST); Gdx.gl.glScissor(1, 1, w - 2, h - 2); }
public void begin () { final int w = fbo.getWidth(); final int h = fbo.getHeight(); fbo.begin(); Gdx.gl.glViewport(0, 0, w, h); Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glEnable(GL20.GL_SCISSOR_TEST); Gdx.gl.glScissor(1, 1, w - 2, h - 2); }
@Override public void render () { // System.out.println( "render"); Gdx.gl.glViewport(0, 0, Gdx.graphics.getBackBufferWidth(), Gdx.graphics.getBackBufferHeight()); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); Gdx.gl.glEnable(GL20.GL_TEXTURE_2D); shader.begin(); shader.setUniformi("u_texture", 0); texture.bind(); vbo.bind(shader); ibo.bind(); Gdx.gl20.glDrawElements(GL20.GL_TRIANGLES, 3, GL20.GL_UNSIGNED_SHORT, 0); ibo.unbind(); vbo.unbind(shader); shader.end(); }
@Override public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); Gdx.gl.glEnable(GL20.GL_TEXTURE_2D); camera.update(); currTexture = hwMipMap.isChecked() ? textureHW : textureSW; currTexture.bind(); currTexture.setFilter(TextureFilter.valueOf(minFilter.getSelected()), TextureFilter.valueOf(magFilter.getSelected())); shader.begin(); shader.setUniformMatrix("u_projTrans", camera.combined); shader.setUniformi("s_texture", 0); mesh.render(shader, GL20.GL_TRIANGLE_FAN); shader.end(); ui.act(); ui.draw(); }