Your Name
Email: <you AT SPAMFREE example DOT com> Assignment 1 answers:
// Question 1: In a GLUT program, how is control passed // back to the programmer? How is this set up during // initialization?
Control is passed back to the programmer through the use of function pointers. Specifically glutDisplayFunc, glutTimerFunc, glutReshapeFunc, glutKeyboardFunc,
- etc all have function pointers as arguments.
// Question 2: What does the parameter to glutInitDisplayMode() // specify?
The parameter to glutInitDisplayMode is a bitmask that corresponds to enabling/disabling display preferences. Thus far, we've used options that toggle between RGBA color mode or color indexing, and double or single buffering (for the swapbuffers vs flush).
// Question 3: What do the calls to glOrtho() // and glViewport() accomplish? GLOrtho appears to control what portion of the rendering is displayed in the viewport. It seems similar to a camera. glViewport sets the portion of the window that will correspond to the preceding camera output. This input is the bottom left corner of the viewport, followed by its dimensions.
The program I wrote changes from points to lines using the letter p.
It changes colors using the number keys `-5
...