CS 420 Computer Graphics
Lab 10
Dr. Tong Yu, Fall 2007
Polygon Modeling 2
Repeat the mesh experiment of Lab 9 except that you use the programs
in "/pool/u/class/cs420/polygon/mesh1". Try to execute mesh again.
Do the following.
- Add the statements
SDL_Delay ( 2000 );
glFlush();
in the appropriate place of drawMesh()
to see the display of surfaces one by one. ( You also need
to add "-lSDL" in your Makefile. ) Observe if the display of
the faces are consistent with the colors used.
- Now add or remove the statements
glEnable( GL_CULL_FACE );
glCullFace ( GL_BACK );
to see the effect of culling back faces.
- Remove the cull statments and use "GL_LINE_LOOP" instead of
"GL_POLYGON" in the drawing.
- Modify the data to draw some other interesting objects.
( EC 0.2 ) Use the above method to draw a cube for
two cases:
a) a solid cube with different colors on different faces,
b) a cube with outline only.