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