Here are pointers to the code examples used to introduce OpenGL. These code snippets were written for in class illustration and example. They do not include comments; doing so leads to code that does not fit on one projector screen. Obviously real code should NOT emulate this comment free style.
- Makefile
- A single make file to make them all, or one at a time.
- exampleTwoWindows.cpp
- An example with two GLUT windows, each with its own mouse callback function.
- exampleRubber.cpp
- An example of a drawing program that uses "rubberbanding" to show changing size of an object in the process of being drawn.
- exampleMenuQuit.cpp
- This example builds upon the previous, and includes a simple popup menu. A Flash Video demonstrates this program.