@Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { GL2 gl = drawable.getGL().getGL2(); viewFrustum.setRight(canvas.getDIPWidth()); viewFrustum.setBottom(canvas.getDIPHeight()); gl.glViewport(x, y, width, height); gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION); gl.glLoadIdentity(); viewFrustum.setProjectionMatrix(gl); relayout(); }
private float getHeight() { return viewFrustum.getBottom(); }
private float getWidth() { return viewFrustum.getRight(); }