Code example for GL10

Methods: glLoadIdentity, glMatrixMode, glViewport, gluOrtho2D

0
	} 
 
	@Override 
	public void onSurfaceChanged(GL10 gl,  int width, int height) {
		// Sets the current view port to the new size. 
		gl.glViewport(0, 0, width, height);
		// Select the projection matrix 
		gl.glMatrixMode(GL10.GL_PROJECTION);
		// Reset the projection matrix 
		gl.glLoadIdentity();
		// Setting all to 2 Dimensions 
		GLU.gluOrtho2D(gl, 0, width, height, 0);
		// Select the modelview matrix 
		gl.glMatrixMode(GL10.GL_MODELVIEW);
		// Reset the modelview matrix 
		gl.glLoadIdentity();
	} 
	@Override 
	public void onSurfaceCreated(GL10 gl, EGLConfig arg1) {
		initFPScounter();