Hi im new to opengl and i followed a tutorial to make a cube rotate with the mouse. The thing is that i added a point light and i wanted to rotate the light but in the inverse direction of the cube so that it is always lighting the front face. I rotate the cube with this:
glRotatef( g_fRot, 1.0f, 0.0f, 0.0f );
glRotatef( g_fRot, 0.0f, 1.0f, 0.0f );
glRotatef( g_fRot, 0.0f, 0.0f, 1.0f );
And i have my light position with a vector g_fLight
I really dont know how to do it
Re: Simple Question
If you set the position of the light at the beginning when you initialize everything, it should stay put.