CS 148 - Winter 2007
Assignment 1 - "Generative Art"
1. Control is passed back to the programmer through callback functions. When certain events take place, such as mouse clicks, GLUT calls a relevant callback function, which is defined by the programmer.
The programmer may write different callback functions for different events. During initialization, the programmer may associate a function with a particular event by passing in a function pointer to that function into a GLUT library function corresponding to this particular event that exists solely to keep track of which function should be called whenever said event occurs.
2. It specifies the display mode of “windows that are created when glutCreateWindow() is called.” Specifically, it is a mask that specifies whether each window uses single or double buffering, RGBA or color index mode, and whether each window uses the depth, stencil, or accumulation buffers.
3. Together, they overlay a coordinate system on top of the viewport window. The origin of this coordinate system is at the lower left corner of the viewport window. The upper right corner of the viewport window is the coordinate (1,1).
If the window were to be resized, we might want to change this to preserve the aspect ratio or absolute size of primitives that are drawn. As is, primitives will stretch or shrink as the window containing them is resized.