CS 320
Feb 2, 5, 2001
Open a new OpenGL project in Visual C. Go to the course web site,
download twodim.cpp
and do the following:
main()
necessary
for reading a scaling factor from the command line.
paint()
, line()
,
boxOutline()
, and boxFill()
.
paint()
in redisplay()
, calling
it at the end of main()
, just before the glutMainLoop()
call. Predict what will happen as a result of this change. Was your
prediction correct? Restore the original call sequence when you're
finished.
glFlush()
in
redisplay()
. Predict what will happen. Was your prediction
correct?
Open a new OpenGL project in Visual C. Go to the course web site,
download cube.c
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 in Visual C. Go to the course web site,
download viewport.c
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
complete covers the clipping region.
display()
and note how the calls to
glViewport()
are being used the 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.