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

3d   accomplish   adjusts   and   back   be   buffering   by   call   callback   calls   case   Chapter   Control   control   coordinate   defined   defines   described   Display   display   does   double   draw   during   entire   for   Func   function   functions   gl   glut   How   how   If   in   In   Init   initialization   keyboard   Keyboard   like   main   might   mode   Mode   new   on   Open   Ortho   our   parameter   passed   passing   pixel   pointers   program   programmer   rectangle   Redbook   Reshape   reshape   resized   set   space   specifies   specify   system   that   The   the   This   this   through   to   up   use   user   using   viewable   Viewport   want   we   What   what   why   will   window  

    EdmondYap/Assignment 1

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

Control is passed back through callback functions. This is set up during initialization by passing function pointers to functions defined by the user (e.g. keyboard) to functions like glutDisplayFunc()/glutReshapeFunc()/glutKeyboardFunc().

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

The call to the function specifies our display mode- RGBA, in this case, and that we are using double-buffering (i.e. passing in GLUT_RGBA | GLUT_DOUBLE as the parameter).

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?

As described in Chapter 2 (Redbook), glOrtho() specifies the coordinate system OpenGL will use to draw on. glViewport() adjusts the pixel rectangle for drawing to be the entire new window; it defines what 3d space is viewable.

Recent