by zorro » Wed Dec 16, 2009 10:10 pm
I don't see anything wrong in your code. To be sure, you can try setting all the light properties, to override the default values. The components which you must set are GL_SPECULAR and GL_SHININESS. This way you control 100% of the light.
You can also try a directional light, with the 4th position value set to 0.0f. This way the light is at infinite distance from the scene and the first 3 values now define the directional vector. This type of light is more common because it's easier to be computed on the graphic chip.
Be sure not to call glEnable(GL_COLOR_MATERIAL) because this overrides the light output and you have no light at all on the object.