570/761 Programming Assignment 4

Due: Sunday, November 7, 2004


The purpose of this programming assignment is to provide experience in the use of


Modify your OpenGL program from Programming Assignment 3 to use material properties, lighting, fog, and texture mapping. Use at least two different lights, two different materials, and two different textures. To make these features visible and clearly identifiable, add keyboard input to minimally do the following:


  1. You might find the source code in usr/local/pub/ncs/graphics/OpenGL/ExamplesLab4/ and http://www.cs.rit.edu/usr/local/pub/ncs/graphics/OpenGL/SIGGRAPHTutorials/ interesting.
  2. There are a bunch of textures available at http://avalon.viewpoint.com.
  3. Fog is most effective if its color is the similar to the background color.

What to submit

You are to submit a directory called lab4dir using the following command:

submit -v ncs-grd cg1lab4 lab4dir

where lab4dir contains your application program lab4.c, a Readme file, if pertinent, and a makefile, as well as any texture files needed to execute your program. I should be able to type

make PROG=lab4

to compile your application program's source file(s) and create a UNIX executable lab4, which is to be created by linking your application program with the OpenGL and GLUT libraries.

If you choose to use C++, instead of C, please be sure to include a Makefile which has been modified to meet the specifications above.


  1. You are expected expected to use the names Readme, lab4dir, and lab4 as specified above. As I am using scripts to help with the grading process, failure to do so is annoying and you will be suitably awarded! :-)
  2. You are expected to include a Makefile and it should function as specified above.
  3. Your directory should only include the source files, any header files that you have created, a Readme file and a Makefile, i.e., please remove any backup files, executables, etc. before submitting.


Your overall programming assignment grade will be based on the following: demonstration of the use of the required routines, the complexity (how interesting) of graphical output, internal documentation, and program design. The gradesheet I will use can be viewed here.

When I begin grading your submittal, if there are any problems, I will send you e-mail and you must then resubmit within 24 hours. Incorrect submittals are subject to penalties!

Nan C. Schaller
Rochester Institute of Technology
Computer Science Department
102 Lomb Memorial Dr.
Rochester, NY 14623-5608
telephone: +1.585.475.2139
fax: +1.585.475.7100
e-mail: ncs@cs.rit.edu
August 25, 2004