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

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

The programmer can control the GLUT program via functions prefixed by glut. Using those functions, you can set the display mode, set window size and position, and what to display.

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 rearrange the screen space used in the window(canvas). Whenever the window is resized, these functions are called to reset the coordinate system and drawing space adapted to the new window.

last edited 2007-01-18 08:59:27 by rescomp-06-91904