glMatrixMode(GL_PROJECTION);glLoadIdentity();glOrtho(-(windowWidth()/2)/Zoom, (windowWidth()/2)/Zoom, -(windowHeight()/2)/Zoom, (windowHeight()/2)/Zoom, -1000, 1000);glGetDoublev( GL_PROJECTION_MATRIX, mProj );glGetIntegerv(GL_VIEWPORT,mViewp);glMatrixMode(GL_MODELVIEW);glLoadIdentity();// ... translate and rotate the camera glGetDoublev( GL_MODELVIEW_MATRIX, mModl );
Then later I want to use gluProject:
gluProject(world.x,world.y,world.z,mModl,mProj,mViewp,&winx,&winy,&winz);
The video below shows the problem. The text "The sword" should be laying where the sword is.
" target="_blank">Youtube
Hires
Any help appreciated!
[Edited by - O-san on September 30, 2010 7:09:39 AM]