View Full Version : light position and transformations

02-15-2009, 08:05 AM
Hello, I have a question:

Imagine I would draw a cube in my scene, with lighting enabled. However, before I draw I do a translation on the modelview matrix.

This translation moves the cube, but will it also move the light in the scene? Will the translation affect lighting?

02-15-2009, 09:48 AM
It depends, if you translate before calling the light functions, it will affect the light. But if you translate after calling light functions, then it won't.

02-15-2009, 10:52 AM
That's all I needed to know. Thanks!