Code example for GL10

Methods: glLoadIdentityglMatrixModeglOrthofglViewport

0
	} 
 
	public void onSurfaceChanged(GL10 gl, int width, int height) {
		Log.i(TAG_RENDER, "onSurfaceChanged");
 
		gl.glViewport(0, 0, width, height);
		gl.glMatrixMode(GL10.GL_PROJECTION);
		gl.glLoadIdentity();
		gl.glOrthof(0.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f);			
	} 
 
	public void onDrawFrame(GL10 gl) {
		Log.i(TAG_RENDER, "onDrawFrame");
 
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		 
		if(shaded){
			gl.glShadeModel(GL10.GL_SMOOTH);
		}else{ 
			gl.glShadeModel(GL10.GL_FLAT);
Contextual code suggestions in your IDE  Get Codota for Java