Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void reshape(GLAutoDrawable glDrawable, int x, int y, int w, int h) {
- System.out.println("### Renderer::reshape w=" + w + "; h=" + h);
- GL gl = glDrawable.getGL();
- gl.glMatrixMode(GL.GL_PROJECTION);
- gl.glViewport(0,0,w,h);
- gl.glLoadIdentity();
- // gl.glFrustum(-1,1,-1,1,0.1f,100.0f);
- if(w>h)
- glu.gluPerspective(64,w/h,FRUSTUM_ZNEAR,FRUSTUM_ZFAR);
- else
- glu.gluPerspective(64,h/w,FRUSTUM_ZNEAR,FRUSTUM_ZFAR);
- // gl.glGetFloatv(GL.GL_PROJECTION_MATRIX,projectionMatrix,0);
- gl.glMatrixMode(GL.GL_MODELVIEW);
- gl.glLoadIdentity();
- }
Add Comment
Please, Sign In to add comment