Code example for GL10

Methods: glLoadIdentity, glMatrixMode, glViewport, gluPerspective

0
		// TODO Auto-generated method stub 
 
        // Set the viewport and projection matrix. 
        final float zNear = 0.1f;
        final float zFar = 100.0f;
        gl.glViewport(0, 0, width, height);
        gl.glMatrixMode(GL11.GL_PROJECTION);
        gl.glLoadIdentity();
        GLU.gluPerspective(gl, 45.0f, (float) width / height, zNear, zFar);
        gl.glMatrixMode(GL11.GL_MODELVIEW);
 
	} 
 
	//Override 
	public void onSurfaceCreated(GL10 gl, EGLConfig config) {
		// TODO Auto-generated method stub 
        //setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); 
	ZLAndroidActivity.exit_flag = true; 
 
        // Disable unused state. 
        gl.glEnable(GL11.GL_DITHER);