Code example for GL10

Methods: glCullFaceglDisableglEnableglFrontFaceglLightModelf

0
	@Override 
	public void draw(GL10 gl, Renderable parent) {
		if (myRenderData != null) {
			if (singeSide) {
				// which is the front? the one which is drawn counter clockwise 
				gl.glFrontFace(GL10.GL_CCW);
				// enable the differentiation of which side may be visible 
				gl.glEnable(GL10.GL_CULL_FACE);
				// which one should NOT be drawn 
				gl.glCullFace(GL10.GL_BACK);
				gl.glLightModelf(GL10.GL_LIGHT_MODEL_TWO_SIDE, 0);
				myRenderData.draw(gl);
 
				// Disable face culling. 
				gl.glDisable(GL10.GL_CULL_FACE);
			} else { 
				/* 
				 * The GL_LIGHT_MODEL_TWO_SIDE can be used to use the same 
				 * normal vector and light for both sides of the mesh 
				 */ 
				gl.glLightModelf(GL10.GL_LIGHT_MODEL_TWO_SIDE, 1);
				myRenderData.draw(gl);
			} 
		} 
	} 
 
	public void setMyRenderData(RenderData myRenderData) {
Connect your IDE to all the code out there  Get Codota for Java