Code example for GL10

Methods: glColor4f, glDisableClientState, glDrawArrays, glEnableClientState, glNormal3f, glVertexPointer

0
		gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);		
	} 
	 
	public static void drawRGBCubeWithNormals(GL10 gl) {
		 
		gl.glVertexPointer(3, GL10.GL_FLOAT, 0, Util.cubeVertices);
		gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);		
		 
		// front / back 
		gl.glColor4f(1f, 0.0f, 0.0f, 1.0f);
		gl.glNormal3f(0.0f, 0.0f, 1.0f);
		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
		gl.glNormal3f(0.0f, 0.0f, -1.0f);
		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 4, 4);
		 
		 
		// left / right 
		gl.glColor4f(0.0f, 1f, 0.0f, 1.0f);
		gl.glNormal3f(-1.0f, 0.0f, 0.0f);
		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 8, 4);
		gl.glNormal3f(1.0f, 0.0f, 0.0f);
		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 12, 4);
		 
		 
		// top / bottom 
		gl.glColor4f(0.0f, 0.0f, 1f, 1.0f);
		gl.glNormal3f(0.0f, 1.0f, 0.0f);
		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 16, 4);
		gl.glNormal3f(0.0f, -1.0f, 0.0f);
		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 20, 4);		
		 
		gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);		
	} 
	 
	public static void drawPartialRGBCube(GL10 gl) {
		 
		gl.glVertexPointer(3, GL10.GL_FLOAT, 0, Util.cubeVertices);