hi,
for some reason, my lighting which will show below is moving when the world object is moving. for example, if i press the up arrow key to move up in my environemnt, the light moves also wrt to the object.
here is what i did in init()
// lighting resources
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_shininess[] = { 60.0 };
GLfloat light_position[] = { -10.0, 5.0, 1.0, 1.0 };
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_SMOOTH);
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
glLightfv(GL_LIGHT0, GL_POSITION, light_position); // this defines position
glEnable(GL_LIGHT0);
// Turn on a light with defaults set
glEnable(GL_LIGHTING);
// Turn on lighting
glEnable(GL_COLOR_MATERIAL);
and i never change it.
any help is appreciated
thank you