I’m working though the OpenGL Programming Guide and I have run into a slight problem.
I rendering a torus (page 258) using a positional light.
When I rotate the torus around its axis I would expect a highligh to move across the torus as the light is reflected into the viewport. However the entire object dims as it rotates until it is completely dark at around 180 degrees. It starts brighting again as it approaches 0 degrees.
I am not rotating the light along with the object as I have only replaced the code that creates the ‘OpenGL gears’ (from the OpenGL grears example) with the code to create the torus.
I use the standard GL_LIGHT0 and the default settings.
I use (glMaterialfv GL_FRONT GL_AMBIENT_AND_DIFFUSE red) for the torus.
The torus is created using a GL_QUAD_STRIP.
I set (glShadeModel GL_SMOOTH) before glBegin(GL_QUAD_STRIP);
Anyone have any hints as to what may be going on ?