These are described in the OpenGL Programming Guide. Time triggered events Dear Dr. Graphics, I would like to cause an event to happen after a fixed period of time. The second argument is the name of the function, and the third argument is passed to the called function. Note that designating a Timer only causes it to be called once. The callback must be registered repeatedly if an activity is to be performed on a regular schedule.
C spins a pair of cubes.
Note that the speed with which they spin increases as you size the window smaller. The spin function is designated as the Idle Func, and therefore, is repeatedly called when nothing else is happening. C only rotates the cubes when the Timer func is invoked by a timer event. Thus, the speed of rotation is relatively unaffected by the size of the window. Note that the main program registers spin as the Timer Func once, and then spin reregisters as the Timer Func each time it ends.