Lighting and display lists

I’ve got a little problem. I’m developing a game using display lists quite a lot. When adding lighting to the scene, the called display lists are not shaded correctly. They seem to get the lighting from where the lists were created initally, even though I add the lights after the lists have been created.

Is this the way it’s supposed to work, or am I doing something wrong? What can be done to fix it?

Originally posted by DiscoBoy:
When adding lighting to the scene, the called display lists are not shaded correctly. They seem to get the lighting from where the lists were created initally, even though I add the lights after the lists have been created.

Do You use transformations to place objects form your display list? If so, be sure you do not affect your light position.

Ex: GlTransfer …
Set_a_light(X,Y,Z) …
glCallList …
… light moves with your object.

If i understand your problem right - this should solve your problem.

 Set_a_light(X,Y,Z) ...
 glTransfer ...
 glCallList ...