These are hints and code examples I created for teaching computer graphics to 3rd/4th year students. All the code has a new BSD/MIT license, have fun, let me know if you do something cool with it.
The first program I write for any new 3D system (hardware or software) is a spinning cube. It's also the first program I give my students. A cube is the "hello world" of 3D programming: if you can draw a cube, you can draw anything.
I use GLUT for teaching, as do many OpenGL books, because it's easy to learn and available for all the major platforms. But if you want to build more complex GUIs around your 3D graphics, you will need a better UI toolkit. Here is the spinning cube rewritten for:
More and more, Python has become my first choice for programming projects. Here is a Python OpenGL cube program. Requires wxPython and PyOpenGL.
Some introductory notes on how to write stereoscopic VR programs.
These are COMP2720 lecture notes about the use of 2D images in 3D graphics. It's meant to be a brief introduction for students who've done some 2D programming with raster graphics.
Why am I staring at a black screen? is a question every 3D programmer asks themselves from time to time. This gives some reasons why.
OpenGL lighting hints for new programmers may be helpful if you are grappling with lights, materials, and surface normals for the first time.
This is a program to demonstrate creating stereo graphics for either redblue stereo (any machine) or active stereo with shutter glasses. Your choice of C or Java. Written for Linux, but uses GLUT/JOGL so should run on other systems with minimal changes. (And it isn't a cube.)
Back to Home Page