hi
i´ve played around a bit with a light source in OpenGL and am a bit confused by its behavior. I position the source with
litepos = { 0.0, -1.0, 0.0, 0.0 }; // directional source
glLightfv(GL_LIGHT0, GL_POSITION, litepos);
the light is also transformed by the modelview mmtrix each frame.
if i´m not mistaken, this should create a light beaming straight down onto my scenery.
however, it doesn´ t, the objects are illuminated from below instead. i´ve checked the normal vectors but they are absolutely correct. okay, so maybe swapping the sign of the light vector solves the problem, but i don´t want to hack around here. could it be that GL_POSITION is somehow multiplied with the inverse modelview matrix, like glSpotlight?
thx
eik