The following 130 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

accomplish   alpha   an   An   and   applications   assignment   back   be   being   between   blue   bluebook   Bluebook   buffer   buffered   but   by   callback   calls   centered   ch05   changes   color   component   consists   control   coordinate   current   cycles   Display   display   does   double   Draws   during   effect   equal   escape   example   exits   Func   function   functions   gl   glut   green   having   height   How   how   id5511492   if   If   in   In   Init   initial   initialization   its   key   Keyboard   like   lines   main   mapping   matrix   middle   might   mode   Mode   more   multiply   of   Open   opengl   Ortho   orthographic   other   our   parameter   passed   passing   pixels   pointers   Port   portion   Pressing   program   programmer   properties   red   reference   Reshape   reshape   resized   rush3d   sample   screen   set   sets   size   specifies   specify   square   states   stencil   such   system   than   that   The   the   This   this   to   up   uses   View   Viewport   want   We   we   What   when   which   why   width   window   with  

    DavidGobaud/Assignment 1

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

In a GLUT program control is passed back to the programmer by callback functions. This is set up during initialization by passing function pointers to functions such as glutDisplayFunc, glutReshapeFunc, and glutKeyboardFunc.

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

The parameter to glutInitDisplayMode() in main() specifies the initial display mode. A display mode consists of properties such as being double buffered, having a stencil buffer, and having an alpha component. In the sample code the parameter is GLUT_RGBA | GLUT_DOUBLE which specifies a double buffered RGBA display mode.

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?

glViewPort() sets the portion of the window that OpenGL uses. glOrtho() sets up the coordinate system. glOrtho() does more (Bluebook states "multiply the current matrix by an orthographic matrix" - but in 2D applications like our current assignment its effect is to set the coordinate system. We might want to change this when a window is resized if the coordinate system changes with the window size. An example is a coordinate system that has a 1:1 mapping with pixels.

Draws a square in the middle of the screen and a centered 'X' (2 lines) with a width and height equal to that of the window.

Pressing any key other than escape changes the color of the 'X' and the square. The color cycles between red, green, and blue. Pressing escape exits the program.