- viewer position vp (vector)
- viewer orientation vo (matrix)
- model position mp (vector)
- model orientation mo (matrix)
How do I have to manipulate the modelview matrix so that the model is properly rendered?
I had thought
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
glMultMatrixf (vo);
glTranslatef (vp);
glMultMatrixf (mo);
glTranslatef (mp);
would do the trick; but neither this nor any permutation does. I have read tutorials and the redbook about this, but to no avail.
![Sad :(](./images/smilies/icon_sad.gif)
I had also tried
glMultMatrixf (mo); //rotate the model first
glTranslatef (vo - mo); //move to offset distance from viewer pos; tried vo + mo too
glMultMatrixf (mo); //rotate the entire scene depending on viewer orientation