Darius Henderson - Assignment1

#1. In a GLUT program, how is control passed back to the programmer? How is this set up during initialization?

Control in GLUT is handled via callback functions that are specified by the programmer during initialization. The programmer essentially "subscribes" to a system event such as window resizing or peripheral input by specifying a function to call on those events. That function will then be activated on each occurance to handle the event.

#2. What does the parameter to glutInitDisplayMode() in main() specify?

It specifies certain properties you want from the display system such as the color model (RGBA vs color-index), the amount of framebuffers (i.e. double buffering for smoother animation), and an associated buffer.

#3. What do the calls to glOrtho() and glViewport() in the reshape() function accomplish? If the window is to be resized, why might we want to change this?

The call to glOrtho() specifies the coordinate system to be used (i.e. x, y, z range), and glViewport() specifies the origin and the width/height of the available screen. This is changed when the window is resized so that the image can be changed to adjust based on the new size of the window (i.e. making the image keep its aspect ratio or absolute size).