Example Program: box.cc

The final callback function is the display callback. This one is simple, consisting of

    glClear( GL_COLOR_BUFFER_BIT );
    drawBoxes();

which clears the display to the background color and then draws the boxes.