After hours of tests to understand how it works I need help...
I tried to test the colors of the lights and materials but I waste my time : my results change with the order of the calls of the opengl functions...
For example this order :
define GL_LIGHT_MODEL_AMBIENT and light0
If I move glEnable(GL_LIGHTING); from the begining after the definition of the geometry I obtain a very different result.
I tested that because I have read in a forum that glColor must be called before enabling the lighting. But I did not read any things like this in the opengl documentation.
So what is the correct order of the calls ?
Thanks in advance.