コード例 #1
0
  @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);
 }