CS 381 Fall 2012
Assignment 3
Assignment 3 is due at 5 p.m. Monday, October 1.
It is worth 20 points.
Procedures
E-mail
answers to the exercises below to
ggchappell@alaska.edu,
using the subject
“GA3”.
- Your answers should consist of the description from Exercise A
and the source code for Exercise B.
These should be attached to your e-mail message.
- Send only the above!
I do not want project files or executables.
I also do not want things I already have, like
glut.h.
- Be sure to include your name in your e-mail.
- I may not read your homework e-mail immediately.
If you wish to discuss the assignment (or anything else)
with me, send me a separate message with a different subject line.
Exercises (20 pts total)
Exercise A — Running a Program with Shaders
Purpose
In this exercise, you will compile and execute an OpenGL/GLUT program
that includes GLSL shaders, and tell me what it does.
You will need the GLEW package installed.
Instructions
If necessary, install the GLEW package on your machine.
Download, compile, and execute the application
check_glsl.cpp
(this requires the header
glslprog.h
to be in your
lib381 subdirectory).
Tell me what the application does.
Hint: If you see something multi-colored,
then shaders are working;
if you do not then they are not.
Exercise B — Interactive 3-D Animation
Purpose
In this exercise, you will write an OpenGL/GLUT program
that allows the user to interact with
an animated 3-D scene rendered in perspective with hidden-surface removal.
Instructions
Write an OpenGL program that meets the following requirements.
- The program must be in C or C++ and produce graphical output using OpenGL.
- The program must be GLUT-based, following the rules for callbacks discussed in class.
- The program must render an interactive, animated 3-D scene,
viewed in perspective with proper HSR.
- As before, this must be done properly,
using double buffering and placing objects with the
model/view transformation.
- The program must include some kind of interactive viewing
method for individual objects or the scene as a whole,
on the level of the object-manipulation
or flight-simulation code written in class.
Notes
- You are not expected to make use of shaders
in Exercise B.
- Standards for code are as for
the first assignment
(must compile, readable, following conventions,
avoid extra output,
clear how program is used, not buggy-looking, give credit, etc.).
- Submitted code may be demonstrated in class.