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

accomplish   adapted   and   area   Assignment   back   be   because   before   bottom   buffered   by   call   Callback   callback   called   calls   can   cannot   characteritics   color   computer   control   coordinate   coordinates   corresponding   defined   discrete   Display   display   distinct   does   double   draw   during   each   ends   event   events   example   far   For   for   Func   function   functions   gl   glut   happen   hit   How   how   However   if   If   in   In   infinite   Init   initialization   instead   interact   into   invoked   key   keyboard   Keyboard   Kim   left   line   Loop   loop   made   main   Main   means   might   Min   mode   Mode   modes   mouse   near   new   of   on   one   Open   Ortho   orthogonal   parameter   parts   passed   position   processed   program   programmer   pushed   queue   rectangular   reset   reshape   resized   respectively   restrict   right   Ring   screen   set   sets   setup   single   size   space   specifies   specify   such   system   that   The   the   them   then   these   this   to   top   typical   up   user   using   via   viewport   Viewport   want   we   What   Whenever   whenever   why   window   with   write   writes   You   you   Young  

    YoungMinKim/Assignment 1

YoungMinKim/Assignment 1에 대해 써주세요.

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

A typical OpenGL program ends in a infinite loop -glutMainLoop(). However, the program can interact with user via callback functions that a programmer writes. Callback functions are invoked whenever discrete events happen, such as mouse events, keyboard events, window events. The events are then pushed into event queue and for each event, the corresponding callback functions, defined by user, are called. For example, if you want to call function key whenever any key on keyboard is hit, you can write glutKeyboardFunc(key) before the line glutMainLoop(). The setup for callback functions has to be made during initialization because the parts after glutMainLoop() cannot be processed by computer.

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

glutInitDisplayMode is a function that specifies the characteritics of the display window. GLUT_RGBA means that you are using RGBA color mode. GLUT_DOUBLE specifies that you are using double-buffered window instead of single-buffered one. You can set distinct modes of display by ORing them.

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?

glOrtho specifies the orthogonal coordinate system you are using. The each parameter means left, right, bottom, top, near, far coordinates, respectively. glViewport() is called to sets the position and size of viewport in the window. viewportis a rectangular area of the window on the screen that restrict OpenGL to draw on. Whenever the window is resized, these functions are called to reset the coordinate system and drawing space adapted to the new window.

Recent