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

Alpha   and   Answers   appears   area   aren   Assignment   back   be   between   Blue   bottom   boundaries   bounds   buffering   but   call   calls   case   clear   clipped   Control   corner   define   depth   Display   display   displayed   done   double   down   drawable   drawn   Due   during   During   entire   events   example   executed   execution   fifth   fit   for   from   front   fully   Func   function   given   gl   glut   Green   hand   handlers   if   If   image   in   In   indicate   indicates   Init   initialization   instead   Keyboard   keystrokes   left   lower   manual   mode   Mode   much   occur   of   off   only   opposed   or   Ortho   out   pages   parameters   passed   portion   program   programmer   questions   Red   refers   related   Reshape   resizing   right   said   same   seems   sets   should   shrunken   since   sixth   something   sort   specifically   specify   specifying   still   that   The   the   then   these   This   this   Thus   to   top   triangle   up   use   used   values   various   vertexes   via   Viewport   we   when   which   will   window   wish   within   work   would  

    BrandonNefcy/Assignment1

Assignment 1 CS 148 Due 01/18/07

Answers to questions from #2

  • 1 Control is passed back to the programmer during various events that occur during program execution, specifically in this code example via keystrokes and window resizing. During initialization, the programmer sets up handlers that will be executed when these events occur, via calls to glutReshapeFunc and glutKeyboardFunc.


  • 2 The parameters to glInitDisplayMode ( in this case GLUT_RGBA | GLUT_DOUBLE ) specify that we wish to use the Red-Green-Blue-Alpha display mode (GLUT_RGBA, as opposed to GLUT_INDEX or GLUT_LUMINANCE ) , and that we wish to use double-buffering (GLUT_DOUBLE, as opposed to GLUT_SINGLE or GLUT_ACCUM).


  • 3 glOrtho appears to define the boundaries of the drawable area. The first four values given to glOrtho specify the left, right, bottom, and top boundaries of the drawing area. Thus if we call glOrtho( 0., 1., 0., 1., -1., 1. ); as is done in the given code, a triangle drawn between vertexes (0.0, 0.9) (0.5, 0.5) (1.0, 0.0) will fit fully within the drawing area. If we change the call to be glOrtho( 0., 0.8., 0., 1., -1., 1. );, the right portion of same said triangle would be clipped off since it is "out of bounds". The fifth and sixth values given to glOrtho aren't as clear... manual pages for the function indicate these specify the "back" and "front" values. This refers to something depth related. glViewport seems to work as a sort of "use this much window area to display the drawing" specifying function. In the given code the call is glViewport( 0, 0, w, h );, which indicates the entire window should be used to display the drawn image. If instead we use glViewport(0, 0, w/2, h/2); then the drawn image still appears, but shrunken down and only displayed in the lower left hand corner of the window.
Recent