AssignmentOne

// 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 a programmer through callbacks--input, menu, or time driven signaling for an event. These callbacks are set up during the initialization stage. Once glutMainLoop() is called, it runs without exit.

//Question 2: What does the parameter to glutInitDisplayMode() // specify? As you may guess, glutInitDisplayMode sets the initial display mode, meaning the initial set of frame buffer capabilities of a window, for top level windows, sub-level windows, and overlays when they are created. GLUT_RGBA is sets an RGBA color model and GLUT_DOUBLE sets a double buffered window.

// Question 3: What do the calls to glOrtho() // and glViewport() accomplish? glOrtho establishes the coordinate system for OpenGL and how the final image will be mapped to the screen. glViewport sets viewport--parameters about how to perform an affine transformation in order to get the window coordinates for an object. With the way it is it is initialized, the object won't be resized proportionally with any window resizings, since the aspect ratio is fixed.

Recent