well, you can easily transfer any matrix you want with glMatrixMult(). Use those formulas to make your matrix and upload them to the modelview stack before you render anything. Or projection matricies, or whatever they are. Those formulas look funky. I just computed my own frustums and sent them to glFrustum() when I did stereo stuff, but… meh.
can you show me how to impliment it?
the formula(that i refer ) show matric 4x4
but in glLookat just have 9 value to fill in so i dont really understand how to do it…
if i’m wrong, can you show me the wright way or any suggestion from you?
a vertex (in object coordinates) is transformed by the modelview matrix. the vertex is now in eye coordinates. then come the projection matrix which transform the vertex in screen coordinates.
gluLookAt modify a matrix (usually modelview) in order to put the camera somewhere.
this function hide the matrix mecanism. as john said, you have to multiply the modelview matrix with the matrix in the formula. I don’t kwow how work your matrix but your code whould look like:
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(head position / orientation);
compute_stereo_left_matrix(m);
glMultMatrix(m);
render_scene();