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

active   actually   adjust   aim   all   an   and   Answers   assignment   Assignment1   at   background   bar   be   below   border   buffered   but   by   call   called   can   cannon   cannonball   cheap   color   defines   Description   Display   display   double   draw   empty   enlarged   fire   flat   for   full   Func   function   gl   glut   graphics   house   if   If   image   in   In   indexing   initialization   inset   instead   into   just   last   leave   like   looking   means   methods   might   mode   multiple   My   my   needed   of   on   one   only   open   or   orangish   Ortho   orthographic   parameter   part   passed   perspective   pointer   power   Press   Progam   program   projection   Questions   re   redrawn   resizing   right   same   screen   set   sets   shooter   shot   shots   simple   single   size   so   specific   specifies   stay   surrounded   that   The   the   this   through   time   times   to   turn   Unfortunately   up   Use   use   used   value   Viewport   wait   want   wanted   was   watch   we   were   whatever   when   Whenever   whether   which   will   window   with   You   you   your  

    AssignmentOneRT

Answers to Questions

1. The function glutDisplayFunc() is called with a function pointer as parameter at initialization. Whenever the window is redrawn, the function passed into glutDisplayFunc is called, which in turn can call whatever methods are needed to draw the image.

2. The parameter specifies the display mode and whether a single or double buffered window is used. The specific value in the assignment, GLUT_RGBA | GLUT_DOUBLE, means to use RGB mode instead of color indexing and to use double-buffered window.

3. The call to glViewport sets the part of the window that openGL can actually draw on. If we were resizing the window, we might want to change this so the graphics stay the same, like if we wanted an inset window of the same size surrounded by an empty border if the window was enlarged. The call to glOrtho defines a perspective for orthographic projection. In my program it is set up to be a flat 2D perspective.

Progam Description

My Assignment1 program is a simple cannonball shooter. Use W and D to adjust the aim of the cannon, and Q and A to adjust the power. The power bar is below the cannon; when it's all orangish you're at full power. Press F to fire and watch your shot. You can fire multiple times, but only one cannonball can be active at a time so you have to wait for your last shot to leave the screen. Unfortunately, the cheap-looking house is just a background; your shots will right through it.

Recent