Esempio n. 1
0
  @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();
  }
Esempio n. 2
0
 private float getHeight() {
   return viewFrustum.getBottom();
 }
Esempio n. 3
0
 private float getWidth() {
   return viewFrustum.getRight();
 }