| | GameDev.net - Lighting and Normals (Site not responding. Last check: 2007-10-15) |
 | | When GL_LIGHTING is enabled, vertices' colours are specified by their material (which holds specular, diffuse and ambient lighting properities) rather than the current colour, however, if we call glEnable(GL_COLOR_MATERIAL) it will cause the current material to "track" the current colour, meaning our calls to glColor3f() will still work. |
 | | Finally, we'll need to make sure that the current material's ambient and specular properites are set to fl, as we don't want (or at least I don't want) the cube to be self-illuminating or reflective. |
 | | Because we're specifying the position of the light before we translate the modelview matrix for drawing the cube, the position will change relative to the cube as the cube rotates. |
| www.gamedev.net /reference/articles/article1682.asp (1173 words) |