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

able   and   Answers   Assignment   Available   back   be   bitwise   blue   Both   buffered   by   callback   called   color   combining   constant   constants   Control   control   corresponding   direction   Display   display   displayed   double   enlarge   ensure   etc   event   from   Func   functions   gl   glut   go   his   Hitting   in   index   inner   keep   keyboard   Keyboard   keys   left   library   line   lines   loop   makes   Man   mock   mode   Mouse   mouse   occurs   of   one   One   Operation   options   or   Ortho   others   outer   outline   Pac   parameter   passed   portion   program   Program   programmer   projection   quad   rectangle   reduce   registered   relative   Reshape   reshape   resize   resized   respectively   right   sets   settings   should   simple   single   size   space   spacebar   specified   specifies   switches   take   that   The   the   then   These   things   This   through   to   tranformation   transformation   two   up   updated   use   using   viewable   Viewport   viewport   volume   want   we   well   When   whenever   which   while   width   window  

    EricLovett/AssignmentOneAnswers

Assignment One Answers

1. Control is passed back through the use of callback functions. These are registered using glutDisplayFunc(), glutReshapeFunc(), glutKeyboardFunc(), glutMouseFunc(), etc. The functions registered are called whenever the corresponding event occurs (a window reshape, keyboard event, mouse event, etc.), and then the programmer is able to take control back from the library code.

2. This parameter specifies the display mode of the program. Available settings are RGBA or color-index and single- or double-buffered, as well as others. These options are specified by combining the constants GLUT_RGBA or GLUT_INDEX and GLUT_SINGLE or GLUT_DOUBLE using a bitwise OR.

3. glOrtho sets the projection transformation, or the viewable volume of the drawing space. glViewport sets the viewport tranformation, or the portion of the drawing space which should be displayed in the window. When the window is resized, we may want to do one of two things: 1) reduce/enlarge/resize the viewport transformation or 2) ensure that the viewport transformation is updated to keep it constant relative to the size of the window.

Program Operation

This is a simple mock-up of PacMan. Hitting the j and l keys makes PacMan go left and right, respectively, and the spacebar switches his direction. The inner blue rectangle is a line loop, while the outer one is the outline of a quad. Both sets of lines are of width 2.

Recent