List of usage examples for com.badlogic.gdx.graphics GL20 GL_CCW
int GL_CCW
To view the source code for com.badlogic.gdx.graphics GL20 GL_CCW.
Click Source Link
From source file:com.perfectplay.org.SkyBox.java
License:Open Source License
public void render(PerspectiveCamera camera) { invView.set(camera.view);//from ww w .j a v a2 s. c om // Remove translation invView.val[Matrix4.M03] = 0; invView.val[Matrix4.M13] = 0; invView.val[Matrix4.M23] = 0; invView.inv().tra(); mvp.set(camera.projection); mvp.mul(invView); Gdx.gl.glEnable(GL20.GL_CULL_FACE); Gdx.gl.glCullFace(GL20.GL_FRONT); Gdx.gl.glFrontFace(GL20.GL_CCW); Gdx.gl20.glDisable(GL20.GL_BLEND); Gdx.gl20.glDisable(GL20.GL_DEPTH_TEST); Gdx.gl20.glDepthMask(false); Gdx.gl20.glActiveTexture(GL20.GL_TEXTURE0); Gdx.gl20.glBindTexture(GL20.GL_TEXTURE_CUBE_MAP, g_cubeTexture); program.begin(); program.setUniformMatrix("u_mvpMatrix", mvp); program.setUniformi("s_cubemap", 0); cube.render(program, GL20.GL_TRIANGLE_STRIP); program.end(); Gdx.gl.glEnable(GL20.GL_DEPTH_TEST); Gdx.gl.glDepthMask(true); }