moving camera

I have a scene with a few lights and I want to move the camera: I want to translate about the axes and to rotate the camera about the look at vector.
To implement translations of the camera do I just do
a gltranslate? How to do the rotation about the look at vector? Do I need to push and pop? (I want to move the lights with the camera)

Thanks

There are a few way that you can simulate camera movement with openGL.

One is to use glTranslate/rotate, without and glPush/pop. Then everything after is drawn using glPush/pop.

nehe.gamedev.net has a tutor on camera movement.

Originally posted by mikemor:
[b]I have a scene with a few lights and I want to move the camera: I want to translate about the axes and to rotate the camera about the look at vector.
To implement translations of the camera do I just do
a gltranslate? How to do the rotation about the look at vector? Do I need to push and pop? (I want to move the lights with the camera)

Thanks[/b]

Thanks. What if I want to use glulookat and avoid using glrotate. How to implement rotations about look at vector using glulookat?

glutLookAt(eye_x,eye_y,eye_z,obj_x,obj_y,obj_z,up_x,up_y,up_z)

eye_x,eye_y,eye_z = coordinates of your eye.
obj_x,obj_y,obj_z = where u look at.
up_x,up_y,up_z = which direction is up. Normally the Up value is 0,1,0. It’s meants that the camera always look infront.

u can refer to red book for more detail.(page 119).