We are doing event programming when constructng our graphics programs. We must, at minimum, establish a function that handles the event of updating the display (client) area of the window. We define our handler
through a call to glutDisplayFunc. The parameter we pass to the GLUT method is the name of our handler, which in this example is display. The handler takes no parameters and must reside in static memory.
Methods defined in C++ classes cannot be passed to glutDisplayFunc since such methods reside in dynamic memory (we will see a "work-around" in our later examples). Other event handlers, also called call-back functions, include ones to handle resize, mouse and keyboard events. We will look at call back functions for these events in later examples.