Code example for GL10

Methods: glClearColor, glClearDepthf, glDepthFunc, glEnable, glHint, glShadeModel

0
    } 
	     
	 
	public void onSurfaceCreated(GL10 gl, EGLConfig config) {
		// Set the background color to black ( rgba ). 
		gl.glClearColor(0f, 0f,0f,1f);  // 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_BLEND);// OpenGL docs.
		// Really nice perspective calculations. 
		gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, // OpenGL docs.
                          GL10.GL_NICEST);
		 
		 
	}