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

about   accomplish   adjust   an   and   area   Assignment   back   background   bar   be   Bitwise   blue   both   buffered   buffers   by   call   called   calls   case   color   colors   combination   constants   Control   control   coordinate   coordinates   correct   defined   defines   depth   describes   designates   Display   display   does   double   drawn   during   example   For   for   from   full   Func   function   functions   get   gl   glut   goes   gradient   How   how   illusion   images   in   In   information   Init   initialization   input   its   Jan   keyboard   Keyboard   lines   logical   loop   main   many   mode   Mode   My   need   of   on   Ortho   our   parameter   parameters   passed   passing   perspectives   placed   pointer   predefined   Press   program   programmer   Question   recompute   renders   Reshape   responds   screen   series   set   sets   setup   space   specifies   specify   system   takes   that   the   There   These   this   Thus   to   triangles   type   up   used   user   uses   using   Viewport   We   we   well   What   whenever   which   while   will   window   with  

    JenniferGee/assignment1

Assignment 1: Jan 17, 2006

My program uses a series of well placed lines to create an illusion of a gradient. There are also 5 blue triangles and 4 loop lines. Press the space bar to change background colors.

Question 1: In a GLUT program, how is control passed back to the programmer? How is this set up during initialization? Control is passed back to the programmer by user-defined functions. These functions are setup during initialization by passing its function pointer as parameters. For example, in main, we have glutDisplayFunc, which takes a function that renders images on the screen; glutReshapeFunc, which takes a function that designates how to adjust the screen perspectives; and glutKeyboardFunc, which takes a function that specifies how the program responds to keyboard input.

Question 2: What does the parameter to glutInitDisplayMode() specify? glutInitDisplayMode's parameter specifies the display mode, which defines information about the color mode and buffers (how many and type). These are predefined constants in GLUT. Bitwise OR is used to get the correct combination. In our case, we have "GLUT_RGBA | GLUT_DOUBLE," which describes RGBA color and a double buffered window.

Question 3: What do the calls to glOrtho() and glViewport() accomplish? Reshape is called whenever we need to recompute window perspectives/coordinates. glOrtho sets the logical coordinates and depth of the window, while glViewport sets the area of the window which the images are drawn. Thus, in our call, the coordinate system goes from 0 to 1 for both x,y, with a depth from -1 to 1. We will be using the full window for the images.

Recent