Orienting the camera without gluLookAt

How can I oriente the camera (modify the projection matrix) without gluLookAt ?

glRotatef();
glTranslatef();

Could you give me an example, because I try this method.
As an example:

glMatrixMode(GL_PROJECTION);
glTranslatef(0.0F, 0.0F, 5.0F);
// I move the camera away from the object

should have the same effect than:

glMatrixMode(GL_MODELVIEW);
glTranslatef(0.0F, 0.0F, -5.0F);
// I move the objet away from the camera

But it doesn’t work and:

glMatrixMode(GL_PROJECTION);
glTranslatef(0.0F, 0.0F, -5.0F);

and

glMatrixMode(GL_MODELVIEW);
glTranslatef(0.0F, 0.0F, -5.0F);

render the same way. So I don’t understand.

Originally posted by fritzlang:
glRotatef();
glTranslatef();

glLoadIdentity();
glRotatef(360 -rot_x, 1, 0, 0);
glRotatef(360 -rot_y, 0, 1, 0);
glRotatef(360 -rot_z, 0, 0, 1);
glTranslatef(-pos_x, -pos_y, -pos_z);

// then draw objects here

This question, however, does not belong in the advanced opengl forum.

fritzlang.

[This message has been edited by fritzlang (edited 12-09-2002).]

gluLookAt() modifies the projection matrix? This is news to me.

gluLookAt post-multiplies the current matrix, whichever matrix that is.

And never put the translations or glulookat into the projection matrix.