Beispiel #1
0
  public void reshape(GLAutoDrawable drawable, int xstart, int ystart, int width, int height) {
    GL2 gl = drawable.getGL().getGL2();

    height = (height == 0) ? 1 : height;

    gl.glViewport(0, 0, width, height);
    gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
    gl.glLoadIdentity();

    glu.gluPerspective(45, (float) width / height, 1, 1000);
    gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
    gl.glLoadIdentity();
  }
Beispiel #2
0
 /** Creates new evaluator */
 public GL2SurfaceEvaluator() {
   gl = GLUgl2.getCurrentGL2();
 }