Problem with global light position

Hello,

I have problem with setting light position related to global coordinates system. What I do is :

gluLookAt()
glLightfv(GL_LIGHT0, GL_POSITION, light_position);

// draw objects

And it look lights source is always related to current camera view. How can i solve this problem ?

Thanks

The position specified by gllightfv is always multiplied by the current modelview matrix. Perhaps you need an identity matrix loaded before setting your global light.

Will it help if I revert gluLookAt ?
I mean sth like :

glLoadIdentity;

// setting camera position
gluLookAt

glPushMatrix
// gluLookAt reverse transformatio to global coord ???
glLightfv(GL_LIGHT0, GL_POSITION …
glPopMatrix

glBegin
… // render objects

try doing it this way:

//Set up global scene lights…
glLoadIdentity;
glLightfv(GL_LIGHT0, GL_POSITION …

// setting camera position
glLoadIdentity;
gluLookAt (…)
glBegin
… // render objects