1
Wiimote Desktop VR/Head Tracking / Re: Desktop VR openGL perspective projection issues
« on: February 20, 2008, 02:43:12 AM »
Thanx for your input OasisGames, i thought nobody was going to respond...
I have some questions regarding your solution:
1.
I assume the method matrixTranslate is a custom method, is this the same as going:
glMatrixMode(GL_MODELVIEW);
glLoadIndentity();
glTranslatef(x, y, 1 - z);
2.
Is this the correct order of the steps for the renedering loop?
1 load the projection matrix (glMatrixMode)
2 perform the perspective projection (glFrustum)
3 set the modelview matrix
4 translate the matrix by the head pos (glTranslateF)
5 set the camera by calling the lookat method with the head coords as indicated in the original project (gluLookAt)
6 render all objects in the scene
Thanx again
P.S I'm busy coding a simple game with this idea where you move through a tunnel specified with a BSpline and dodge objects with you head. If i can just get the perspective working right it will look awesome! If I manage to do it I'll upload the game...
I have some questions regarding your solution:
1.
I assume the method matrixTranslate is a custom method, is this the same as going:
glMatrixMode(GL_MODELVIEW);
glLoadIndentity();
glTranslatef(x, y, 1 - z);
2.
Is this the correct order of the steps for the renedering loop?
1 load the projection matrix (glMatrixMode)
2 perform the perspective projection (glFrustum)
3 set the modelview matrix
4 translate the matrix by the head pos (glTranslateF)
5 set the camera by calling the lookat method with the head coords as indicated in the original project (gluLookAt)
6 render all objects in the scene
Thanx again

P.S I'm busy coding a simple game with this idea where you move through a tunnel specified with a BSpline and dodge objects with you head. If i can just get the perspective working right it will look awesome! If I manage to do it I'll upload the game...