OpenGL Wagon Train

This series of examples illustrates basic concepts of OpenGL using 2D examples, and a single 3D example. The first two examples each defines a library function - first to draw a wagon wheel, then to draw a wagon - along with a program to test that library function. The last uses these two libraries together to culminate in a wagon train rolling across the window.


(Imagine the wagons moving to the left.)

Example 1: Wagon wheel
Example 2: Still wagon
Example 3: Moving wagon train
Example 4: 3D wagon train

All the code on these pages can be downloaded in a ZIP file or in a TAR file.