WINDOW MECHANICS

[Angel, p.96]
One must always begin by clearing the window:
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
-- The first sets the color for clearing (here it is black).
-- The second clears the frame buffer. If you want to also clear the depth buffer, do instead:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
You may need to force the primitives to be written by calling
glFlush();
If you need to synchronize with the flushing (E.g., you do not want to accept user inputs until all the drawing has appearing on the screen), issue the stronger command
glFinish();
To make sure that hidden surfaces are removed, call
glEnable(GL_DEPTH_TEST);

-- Also make sure taht the depth buffer is cleared in the beginning (see above).
You may want to begin by specifying the drawing colors, using glColor3f(r,g,b).
MORE ON VIEWING SETUP