View Full Version : Scene lights reset

12-05-2010, 05:18 AM
I've read confusing posts on the web, claiming that light parameters, set with e.g. glLightfv() need to be refreshed (set again), each frame. Is this accurate? Also, if I switch lighting off or a light off and then back on will the light parameters still be there?

Are there any cases where light parameters need to be refreshed?

12-05-2010, 05:52 AM
Light parameters do not need to be refreshed except the position.
I haven't used built-in OpenGL lights for about a decade now but as I remember light positions are not transformed by the modelview matrix on each frame but only applies the current modelview matrix to the light position when glLight* is called for specifying the position.

12-05-2010, 09:24 AM
Thanks, so this is something for a modelview_matrix_change() handler. Good point.