Hi.
I have a rotating object working which works via (pseudocode, not near my code atm)
glTranslatef(x,y,z)
glRotatef(deg,x,y,z)
glMultMatrix(my_starting_orientation_matrix)
drawstuff
I was thinking I initially could use glLoadMatrix(my_starting_orientation_matrix) instead of the latter glMultMatrix, but if I load a rotated matrix, then the following translations will be applied to the rotation won't they ?
So for example, if I have an object that I want to rotate by 90 deg every draw (as its facing the wrong way), is it possible to start off with a loaded matrix that re-orientates itself always by 90 whatever, and not affect the translation that follows ?
So in my head I want to do...
glLoadMatrix (matrix_that_will_rotate_object_by_90) //starting orientation
glTranslate //where I've moved to
glRotate(x,y,z) //where I've just turned facing to
The glLoadMatrix then sends translations over the new rotation (which makes sense). Is it possible to avoid that ?
(just to clarify, after loading a matrix that does a rotation by 90, if I then translate down the z axis which works with a latter MatrixMult, it "looks" like it translates down the x axis if I do a former LoadMatrix)




