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

absolute   accomplish   allow   alter   and   appropriate   aspect   assignment   at   available   back   ball   basic   be   bit   buffering   built   by   callback   called   calls   can   choose   clipping   color   combination   constants   Control   control   coordinate   corner   created   current   defines   dimentional   Display   display   does   draw   during   entire   event   faces   fixed   flags   for   found   Func   function   functionality   functions   game   gl   glut   height   How   how   If   in   In   Init   initialization   input   keeping   Keyboard   left   lines   lower   main   maintain   Meanwhile   might   mode   Mode   model   moving   must   My   my   number   objects   occurs   of   on   operation   options   or   order   Ortho   our   output   paddles   parameter   passed   planes   played   pointers   Pong   program   programmer   Programmer   programmers   Question   ratio   region   register   registered   represent   Reshape   resize   resized   rudimentary   score   set   setup   short   simplified   size   space   specifies   specify   system   that   The   the   their   these   they   this   three   through   to   top   two   up   use   version   very   Viewport   want   way   we   well   What   when   which   why   width   will   window   Window   windows   wise   with  

    ChalmersWang/Assignment1

My program is a simplified version of Pong. It has two paddles and a moving ball that is built by drawing 360 short lines. A number of constants that control the way the game is played can be found at the top of my code. It has a rudimentary score keeping system as well as very basic output functionality.

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 through callback functions that are registered during the initialization of the program. The Programmer must register these callback functions in main. In this program, calls to glutDisplayFunc, glutReshapeFunc, and glutKeyboardFunc, with the appropriate function pointers represent this setup. The function pointers passed to these callback functions are the functions that are called when the appropriate event occurs.

Question 2: What does the parameter to glutInitDisplayMode() specify?

The parameter to glutInitDisplayMode specifies the display mode for windows created when glutCreateWindow() is called. The display mode is a combination of color model (GLUT_RGB, GLUT_RGBA or GLUT_INDEX) and buffering (GLUT_SINGLE, GLUT_DOUBLE) options.The parameter is a bit-wise or combination of flags that allow programmers to choose which options they want for their program.

Question 3: What do the calls to glOrtho() and glViewport() accomplish? If the window is to be resized, why might we want to change this?

glOrtho defines the three dimentional coordinate system that the window will have. The input to glOrtho represent the faces of the clipping planes which our program will use. Meanwhile, glViewport specifies the drawing region. It specifies the lower left corner and the width and height of the region. In this assignment, we want to draw on the entire space available. If the window is resized, we might want to alter the coordinate system (through glOrtho) in order to maintain the current aspect ratio or the absolute size of objects fixed during the resize operation.

Recent