CS 420 Computer Graphics


Lab 8
Dr. Tong Yu, Fall 2007

Vertex Array

  • Login and open two windows, one for editing and one for compiling and executing programs.

  • Make the directory ~your_login_name/cs420/varray copy the files from /pool/u/class/cs420/varray to it. Compile and execute varray. Repeat clicking left, middle and right mouse buttons. What happens?

    Modify the program so that it displays other triangular shapes when you click the mouse buttons. Then rewrite the routines using the glArraryElement() function ( see class notes ).

    Try the Icosahedron example discussed in class. You need to use a different color for each triangle in order to see the object.

    ( Extra Credit 0.2 ) Make use of the functions glPolygonMode() and glCullFace() discussed in