Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pmvMatrix.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
- pmvMatrix.glLoadIdentity();
- pmvMatrix.gluPerspective(fov, aspect, zNear, zFar);
- pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
- pmvMatrix.glLoadIdentity();
- pmvMatrix.glTranslatef(position.x, position.y, position.z);
- pmvMatrix.glRotatef(pitch, 1, 0, 0);
- pmvMatrix.glRotatef(yaw, 0, 1, 0);
- pmvMatrix.glRotatef(roll, 0, 0, 1);
- pmvMatrix.setDirty();
- pmvMatrix.update();
- GL2 gl = GLContext.getCurrentGL().getGL2();
- gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
- gl.glLoadTransposeMatrixf(pmvMatrix.glGetPMatrixf());
- gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
- gl.glLoadTransposeMatrixf(pmvMatrix.glGetMvMatrixf());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement