This program demonstrates the color properties of OpenGL. Only the vertices of the cube are colored. If you have a pretty good video card (one RUNNING at least 16-bit color) then you'll see the interpolation that OpenGL does for colors between vertices. This is SMOOTH shading. If you look closely you'll see the cube dip into the rear clipping plane. A fun thing to do is to see how the animation code works. Try commenting out the animation short-circuit that keeps the frame rate to less than 33 frames/sec and see if you can tell the difference. You can also try turning on FLAT shading and seeing what difference that makes. Try making the window really really small. The animation gets better, but due to the design of the animation code, it doesn't go any faster.
The scene is animated, so try the following keys:LIGHTING 1 demonstrates the materials properties of OpenGL and their effect when light shines on the surfaces. The 4x4 matrix of spheres run the gamut of ambient, diffuse, shininess, and specular properties. The only one not demonstrated is emission. The axis arrows indicate increasing values.
LIGHTING 2 demonstrates different diffuse and specular light components on a white object. Notice the green specular with the white diffuse.
LIGHTING 3 demonstrates different lights (positional and directional) which light the text: "OpenGL and Windows"
The scene is animated (you have to start the animation), try the following keys: