PJStewart

Patrick Stewart

Email: <picard01@stanford.edu>

1. The glutKeyboardFunc() allows the user to actually perform interruptions on the main loop, which runs until the program is terminated. This is set up with the line

glutKeyboardFunc( keyboard );

*before* the main loop function is called.

2. It specifies whether the mode is RGBA or indexed. The GL_SINGLE/_DOUBLE also signals whether a single- or double-buffer mode is used.

3. In the reshape function, glViewport() determines the origin of the available viewing area in the drawing window. You can choose a subset of the current drawing window to display a transformation.

glOrtho() is used like the old SGI chips were: to project an orthographic viewing box and create the transformation (as a matrix) that will accomplish this transformation.

If we change the window size, we'll definitely want to change these settings, as the resize will affect the aspect ratio and the "viewing window" of the object(s) in the window. Not changing the these command parameters would distort and basically destroy the desired effect we want!


CategoryHomepage

Recent