viewportH = (int) (width * (1 / aspectRatio));
}
viewportX = ((width - viewportW) / 2);
viewportY = ((height - viewportH) / 2);
GL gl = drawable.getGL();
gl.glViewport(viewportX, viewportY, viewportW, viewportH);
gl.glGetIntegerv(GL.GL_VIEWPORT, viewport);//Update viewport buffer
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluPerspective(viewField, aspectRatio, nearDistance, farDistance);
gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, projMatrix);//Update projection buffer
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
reshape3DScene(drawable.getGL());
if (DEBUG) {
DEBUG = false;
System.err.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
System.err.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
System.err.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
}
resizing = false;
}
}