   glTranslatef vs glLookAt
  HowzitWhen must I use glTranslatef and when must I use glLookAt?Shot 
  glTranslatef is a translation, gluLookAt is a rotation.A translation is of the following form:| 1 0 0 x || 0 1 0 y || 0 0 1 z || 0 0 0 1 |While a rotation is of the following form:| xx yx zx 0 || xy yy zy 0 || xz yz zz 0 || 0  0  0  1 |Think of a translation as walking forward and a rotation as turning around in place. ;  I always thought you were suppose to use glTranslatef when placing objects and gluLookAt when working with the camera.Thats how I was taught and thats how the Red Book uses it. ;  gluLookat is a rotation matrix generator.Imagine a character''s head following an object around a scene. You can use gluLookAt to generate the matrix to rotate the head of the character.As auLucifer stated though, it is generally easiest to think of gluLookAt when working with the camera (where do you want the camera to look? gluLookAt gives you an easy api for that).;  Lets say we have a model drawn in our scene 100 units away from us. If we were to use gluLookAt to place the camera 50 units forward before drawing that model, when we view the scene the model will appear to be closer. After all, our camera is 50 units closer.Alternatively, you could call a translatef function that moves us backwards   50 units before we draw the model. What effect would that have? Well, when we draw the model it will be 50 units closer to the centre of the scene and we will get the same effect. Have you ever tried using the gluLookAt command after    you've drawn all your geometry for the frame? If you do, you'll notice that it doesn't work. This is because all gluLookAt essentially does is make the necessary translations and rotations to ensure that when the geometry is drawn, it is in such a position that it appears our camera has moved. In truth, there is no camera and we always view the scene from the centre at (0,0,0).Never mind spoons, in OpenGL, there is no Camera.Knowing this you can implement a Camera class of your own that does nothing more than store values for the camera's desired location and rotation and have it call appropriate translate and rotate functions at the start of each frame.   So, in answer to your original question, (I hope I have'nt confused you) use glTranslatef to move around in the scene when you want to draw different geometry in different locations. Use gluLookAt for simple and trustworthy camera positioning. Once you've got adept at using both you can mess around with making your own camera class which uses simple translatef and rotatef calls.    [edited by - m_wherrett on February 5, 2004 4:34:21 AM]