I am trying to do something basic with GL. However I got a problem with the lights. I have a cube in the viewport and when I put GL_LIGHT0 at some point, it shades the cube without any problem. But GL_LIGHT1 does not act normally. When I disable light0 and put GL_LIGHT1 at the same location of light0, it just gives a different color to the shape. No shading, no lighting.
What is the problem here?
The default values for
GL_AMBIENT,GL_DIFFUSE,GL_SPECULARwithGL_LIGHT0is (1,1,1), while it is (0,0,0) forGL_LIGHT1toGL_LIGHT6.If you set these values using
glLight*, you should see consistent behaviour.