Code example for GL10

Methods: glClearColorglClearDepthfglDepthFuncglEnableglHintglShadeModel

0
	 * microedition.khronos.opengles.GL10, javax.microedition.khronos. 
	 * egl.EGLConfig) 
	 */ 
	public void onSurfaceCreated(GL10 gl, EGLConfig config) {
		// Set the background color to black ( rgba ). 
		gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // OpenGL docs.
		// Enable Smooth Shading, default not really needed. 
		gl.glShadeModel(GL10.GL_SMOOTH);// OpenGL docs.
		// Depth buffer setup. 
		gl.glClearDepthf(1.0f);// OpenGL docs.
		// Enables depth testing. 
		gl.glEnable(GL10.GL_DEPTH_TEST);// OpenGL docs.
		// The type of depth testing to do. 
		gl.glDepthFunc(GL10.GL_LEQUAL);// OpenGL docs.
		// Really nice perspective calculations. 
		gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, // OpenGL docs.
				GL10.GL_NICEST);
	} 
 
	/* 
	 * (non-Javadoc)