Originally posted by esuvs:
I know this is a fairly simple problem, but I can't quite get my head around it...
I have a model, centered at about (0,0,100). What I would like to do is to have this model rotate about it's own center.
So I try:
glTranslatef(0,0,-100); //bring to origin
glRotatef(angle, 0.0, 1.0, 0.0); //rotate
glTranslatef(0,0,-50); //bring into view frustum.
What i think happens is that the second translate sends it off along the new (rotated) z-axis, whereas I want to send it down the original (into the screen). How do I do this?