mLastUpdate = System.currentTimeMillis(); } @Override public void onSurfaceChanged(GL10 gl, int width, int height) { // Set the new viewport, thanks to resolution gl.glViewport(0, 0, width, height); this.width = width; this.height = height; ratio = (float) width / height; // Set Camera gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); GLU.gluOrtho2D(gl, 0 , width, height, 0); // Go to Model View Mode gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); // Init engine if(!mReady && width > height) init(gl); else if(mReady && width > height)