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

accomplish   all   and   appropriate   arguments   automatically   axis   back   be   bit   bitwise   called   calls   case   coded   color   control   coordinate   corner   currently   Display   display   displays   does   during   either   entire   even   factor   for   forces   from   Func   function   functions   gets   gl   glut   go   How   how   if   If   in   In   ing   Init   initialization   its   keep   key   keyboard   Keyboard   left   lower   main   masks   might   mode   Mode   new   number   of   on   or   Ortho   own   parameter   passed   passes   pixel   pixels   presses   program   programmer   putting   rectangle   Reshape   reshape   reshaped   resize   resized   resizing   same   scale   scheme   screen   set   sets   shapes   size   specifies   specify   such   system   The   the   these   this   to   up   use   user   usually   Viewport   want   we   What   when   why   will   window   with  

    Assignment 1

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

The programmer passes in functions such as display, reshape and keyboard to the GLUT functions and GLUT calls these functions when appropriate. The GLUT functions for these functions are: glutDisplayFunc( display ); glutReshapeFunc( reshape ); glutKeyboardFunc( keyboard );

Display gets called when glut displays a new screen (either on its own or when the programmer forces it), reshape gets called when the window is reshaped and keyboard gets called when the user of the program presses a key.

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

It specifies the display mode, usually with the bitwise OR-ing of GLUT display mode bit masks (color scheme).

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?

glOrtho() specifies the coordinate system (in this case to go from 0 to 1 on all 3 axis, putting 0 in the lower left corner). glViewport() sets the pixel rectangle for drawing to be the rectangle in the arguments (in this case the entire window). As currently coded if we use the coordinate system, shapes will automatically scale when resizing the window, we might want the glOrtho() arguments to be a factor of the number of pixels and keep shapes the same size even when we resize the window.