Пример #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();
  }
Пример #2
0
 private float getHeight() {
   return viewFrustum.getBottom();
 }
Пример #3
0
 private float getWidth() {
   return viewFrustum.getRight();
 }