Code example for GL10

Methods: glLoadIdentity, glMatrixMode, glOrthox

0
 
		StarcraftCore.context.update(); 
	} 
 
	public void onSurfaceChanged(GL10 gl, int width, int height) {
		gl.glMatrixMode(GL10.GL_PROJECTION);
		gl.glLoadIdentity();
 
		// Then change render type to orthogonal to prevent perspective using 
		// real screen size (1 pixel = 1 unit) 
		gl.glOrthox(0, width, height, 0, 0, 1);
 
		// Reset modelview 
		gl.glMatrixMode(GL10.GL_MODELVIEW);
		gl.glLoadIdentity();
	} 
 
	private void createMapTexture(GL10 gl) {
		// mapRender = new MapRender(gl); 
	}