Code example for GL10

Methods: glLoadIdentity, glMatrixMode, gluLookAt, gluPerspective

0
	private float _cameraPosZ = 9.82f;
	private void setTablePersp(GL10 gl) {
		_cameraPosY += touchDeltaY * 0.001f;
		_cameraPosZ += touchDeltaX * 0.001f;
		 
		gl.glMatrixMode(GL10.GL_PROJECTION);
		gl.glLoadIdentity();
		GLU.gluPerspective(gl, 45.0f, _aspect, 0.1f, 100.0f);
		//gl.glFrustumf(-_aspect, _aspect, -1, 1, 0.1f, 100.0f);  // apply the projection matrix 
		gl.glMatrixMode(GL10.GL_MODELVIEW);
		gl.glLoadIdentity();
		 
		// When using GL_MODELVIEW, you must set the camera view 
		GLU.gluLookAt(gl, 0, _cameraPosY, _cameraPosZ,
		//GLU.gluLookAt(gl, 0, 75.3f, 9.82f, 
						  0, 0, 0, 
						  0, 1, 0); 
	} 
	 
//	private float _cameraPosY = 12.09f; 
//	private float _cameraPosZ = 36.16f;