Easy question: state.light[n].position in fp

The spec has a line that says this

state.light[n].position (x,y,z,w) light n position

but the position is in eye space? I’m guessing it is.

It’s exactly the same value that you’ve set in your OpenGL program before with glLight(GL_POSITION, …).
So it’s in eye space, but in the eye space that was set at the time when glLight was called.

The light position is in whatever space you like, so long as when you specify the light position with glLight, you have the correct current modelview matrix to transform it into eye space.
I calculate a set of lights to use for each object in my scene, so my light positions are calculated in object space, with that objects modelview matrix loaded.

Originally posted by DanielHawson:
with that objects modelview matrix loaded.

…and then every frame Matrix Reloaded – so be careful, watch out for Deja Vu’s

[This message has been edited by matt_weird (edited 06-22-2003).]