Example Programs by Some Other People

by D.W. Hyatt

OpenGL Examples by Mark Kilgard

The following programs have some interesting effects that you might want to use as you develop programs for this class. Take a look at the author's code and try to figure out what he's done. There are times, I am sure, that you wished the author had commented his code more thoroughly. After studying these programs, you might even come to the conclusion that well commented code is easier to understand. If you use any of these concepts, be sure to give credit to the author in your code. Add extra comments to your work so others can learn from you!



Stars

This program displays a background of stars giving the appearance of someone traveling through space.

Source Code


Font Demo

This program shows how to use stroke fonts which can be scaled and transformed in 3D whereas the other bit mapped fonts cannot.

Source Code
Modified Code


Paper Airplanes

This program draws a number of "Paper Airplanes" using the GL_TRIANGLE_STRIP option. The planes fly around randomly in the window. The program has several useful features including how to attach a Pull Down Menu, how to create a shaded background, and how to add additional objects to the display.

Source Code