570/761 Programming Assignment 4
Due: Sunday, November 7, 2004
The purpose of this programming assignment is to provide experience in the use
- material properties,
- texture mapping,
- lighting, and
- fog in OpenGL, and
- the glutKeyBoardFunc callback function for toggling the above features on and off
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:
- f - toggles fog on and off
- 0 - toggles light 0 on and off
- 1 - toggles light 1 on and off
- 2 - toggles texture 1 on and off
- 3 - toggles texture 2 on and off
- 4 - toggles material 1 on and off
- 5 - toggles material 2 on and off
- 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.
- There are a bunch of textures available at http://avalon.viewpoint.com.
- 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
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
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.
- 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! :-)
- You are expected to include a Makefile and it should
function as specified above.
- 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
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
August 25, 2004