CS 320
Feb 18, 2009
Open a new OpenGL project. Go to the course web site,
download cube.c
, import it into your project, and do the following:
DEPTH
. Compile and run. Describe what happens. What
is going on? Restore the definition when you are finished.
zNear
in the two glOrtho()
calls in myReshape()
to
0.0
. Predict the result. Was your prediction correct?
Open a new OpenGL project. Go to the course web site, download
viewport.c
, import it into your project, and do the following (don't run the program until you're told to do so):
maintainAspectRatio
and realtimeRedraw
.
list
display list created in main()
stores the
vertices of the two polygons in a list so that the list call be called
later (in display()
) to speed rendering. Note that the display list
completely covers the clipping region.
display()
and note how the calls to
glViewport()
are being used to change the mapping from world
coordinates to window coordinates. Execute the code ``by hand'' to predict
what will be displayed when you run the program.
realtimeRedraw
do, exactly? Explain what's
going on with it. Tap the escape key to exit.
reshape()
called?
maintainAspectRatio
is true, explain how
reshape()
works.
idle()
to see how text is displayed. Suggest a better
way.