Moving a light when changing the viewpoint

I have been reading the blue book and I have a problem. I can’t reproduce the example of moving the viewpoint and with it moving a light.

This is my projection transformation:

    glViewport(0,0,canvasWidth,canvasHeight);//set the current viewport

	glMatrixMode(GL_PROJECTION);//Reset the projection matrix



lightPosition is set at 0.0,0.0,0.0,1.0 so that it is at the origin and considering that the viewpoint moves with the translations and rotations and so would the light.
The problem is that this does not happen. The light seems to be stationary. Whenever I translate the viewpoint and look at my objects from other angles/views the light seems stationary and it definetely does not originate from the viewpoint(eye of the user).

Any tips on how to do it? I must have completely misunderstood something. Thanks in advance

The light final position is computer with the modelview matrix active at the moment of the GL_LIGHTPOSITION
so the pattern is this:

setup projection matrix
setup camera position
glLight(GL_LIGHT0, GL_POSITION, lPosition)
setup object matrix
render object 1

and so on…

Oh thanks, now I understand. I corrected my light problem now, thanks.

I have one more question though and this one is about the camera. I was rotating my view by doing translations and rotations on the projection matrix.

I read that this is very wrong and it should be avoided. So now I moved my camera position setup to modelview matrix. But how should I setup my camera?

GluLookAt seems nice but it does not offer any way to rotate, right? I could calculate my own rotated camera x,y,z coords and use these at GluLookAt? Would that be wise?

Or is the better choice to just translate and rotate the whole scene and keep my view at the origin, hence giving the illusion of moving the camera?