I’m writing a 3D Asteroids sort of game, and wouldn’t it be cool if my asteroid models were shaded? Unfortunately, whenever I try this, the lighting and shading for the object seems to rotate along with it(as if the lighting was some sort of texture). I’ve downloaded a tutorial from NeHe, and THAT program had the same problem. Can anyone give me a few pointers? Thanks.
I’m writing a 3D Asteroids sort of game, and wouldn’t it be cool if my asteroid models were shaded?
It most certainly would. And I love a good game of asteroids.
Perhaps your problem has to do with your light being in the wrong coordinate space? As I recal, OpenGL transforms the supplied light position with the current model-view matrix.