-
Advanced Member
Frequent Contributor
Scene lights reset
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?
-
Advanced Member
Frequent Contributor
Re: Scene lights reset
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.
Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
Technical Blog:
http://www.rastergrid.com/blog/
-
Advanced Member
Frequent Contributor
Re: Scene lights reset
Thanks, so this is something for a modelview_matrix_change() handler. Good point.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules