HW1: Shiny Red Triangle
CS 481/681 2007 Homework, Dr. Lawlor
Your first homework is to write an OpenGL graphics application with:
- One red triangle.
- Some way to interactively rotate the triangle through a
substantial angle (using the keyboard, mouse, a GLUI_Rotation, another
GUI slider, etc.)
- Some sort of reasonable lighting--and specular per-pixel lighting looks especially nice! Don't worry about shadows.
- Some use of programmable shaders, like GLSL.
If you can't do these things after looking at the CS381 examples, this class is going to be very hard for you!
Here's a screenshot of what I wrote. I started with the
"tiny_glsl.cpp" example, added "#include <glew.c>" to fix the
link error, added GLSL compile error checking code, wrote a pixel
shader, added a rotation matrix, and hooked it to the mouse with
glutMotionFunc. I think I'd have had a much easier time using my
ogl libraries, though...

This assignment is due at midnight on Thursday, January 25. Please
turn in ALL source code used for this assignment. Please do
include a binary (for Windows, Linux, or Mac OS X).
Turn in your assignment files on
blackboard.