In OpenGL I created a simple cube that I rotate. I am rotating the cube, not the camera!
Then I added a light source. The light also rotates with the cube. How can I avoid this?
Can somebody tell me when to activate which matrix mode and when to push and pop the current matrix. I have tried many, many combinations and sequences, but the damn light always (!) follows the rotation.
I am not expecting a general answer that just says that has something to do with the matrix stack. A concrete short example of a rotating object with a non-rotating light would be great!