Code example for GL10

Methods: glLoadIdentity, glMatrixMode, glOrthof, glViewport

0
		// nativeInit(); 
	} 
 
	public void onSurfaceChanged(GL10 gl, int w, int h) {
		//gl.glViewport(0, 0, w, h); 
		gl.glMatrixMode(GL10.GL_PROJECTION);
		gl.glLoadIdentity();
		gl.glMatrixMode(GL10.GL_MODELVIEW);
		gl.glLoadIdentity();
		gl.glViewport(0, 0, w, h);
		gl.glOrthof(0.0f, (float) w, (float) h, 0.0f, 0.0f, 1.0f);
		nativeResize(w, h);
	} 
 
	public void onDrawFrame(GL10 gl) {
 
		nativeInitJavaCallbacks(); 
 
        // Calls main() and never returns, hehe - we'll call eglSwapBuffers() from native code 
		nativeInit(ONScripter.gCurrentDirectoryPath, ONScripter.gWideScreen, ONScripter.gDisableRescale);