@Override
  public void reshape(GLAutoDrawable glad, int x, int y, int w, int h) {
    System.out.println("reshape() x: " + x + " y: " + y + " width: " + w + " height: " + h);

    GL3 gl3 = glad.getGL().getGL3();

    gl3.glViewport(x, y, w, h);
  }
示例#2
0
文件: Lorenz.java 项目: Grisu118/pfcs
 @Override
 public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
   GL3 gl = drawable.getGL().getGL3();
   // Set the viewport to be the entire window
   gl.glViewport(0, 0, width, height);
   float aspect = (float) height / width;
   bottom = aspect * left;
   top = aspect * right;
   // -----  Projektionsmatrix festlegen  -----
   setOrthogonalProjection(gl, left, right, bottom, top, near, far);
 }