daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void reshape(GLAutoDrawable glDrawable, int x, int y, int w, int h) {
  2.         System.out.println("### Renderer::reshape w=" + w + "; h=" + h);
  3.  
  4.         GL gl = glDrawable.getGL();
  5.         gl.glMatrixMode(GL.GL_PROJECTION);
  6.         gl.glViewport(0,0,w,h);
  7.         gl.glLoadIdentity();
  8. //      gl.glFrustum(-1,1,-1,1,0.1f,100.0f);
  9.         if(w>h)
  10.             glu.gluPerspective(64,w/h,FRUSTUM_ZNEAR,FRUSTUM_ZFAR);
  11.         else
  12.             glu.gluPerspective(64,h/w,FRUSTUM_ZNEAR,FRUSTUM_ZFAR);
  13. //      gl.glGetFloatv(GL.GL_PROJECTION_MATRIX,projectionMatrix,0);
  14.         gl.glMatrixMode(GL.GL_MODELVIEW);
  15.         gl.glLoadIdentity();
  16.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top