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

accomplish   an   and   assigning   axis   back   be   buffering   by   called   calls   can   case   colour   control   coordinate   describe   Display   display   distorted   does   don   double   during   endless   entire   events   example   execute   For   for   form   from   Func   function   functions   get   gl   glut   handle   How   how   if   If   in   In   Init   initialisation   initialization   invoked   just   keyboard   loop   main   maintain   might   Mode   model   mouse   needs   of   options   or   Ortho   parameter   part   passed   pixels   program   programmer   ratio   redraw   reshape   resize   resized   runs   set   single   so   specific   specified   specifies   specify   system   tells   that   The   the   Therwise   this   This   to   type   up   us   use   Viewport   waiting   want   We   we   What   what   when   whenever   whether   which   while   why   window   windows   write  

    PaulLin/Assignment 1

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

The control is in the form of events, which the programmer needs to write functions to handle. OTherwise the program just runs an endless loop while waiting for events. For example, the "display" function is called whenever GLUT needs to redraw the window and display (glutDisplayFunc(display);) This is set up during initialisation by assigning the functions to specific events, which in this case is to execute "display" when the glutDisplayFunc is invoked. The programmer can also set up events for keyboard events and mouse events.

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

It specifies what type of window we want to create. For example, we can describe the colour options, and whether we want to use a single buffering or double buffering. For us, it specifies we want the RGBA colour model, and double buffering.

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 glOrtho() tells the system the coordinate system we want to use, for example, the x-axis from -1 to 1, and y-axis from -5 to 5. The glViewport() tells the system which part of the window we want to use, if we don't want to use the entire window. This is specified in pixels. We may want to change this when we resize windows, to maintain the x/y ratio so that the drawing doesn't get distorted.