Articles » 3D Graphics via OpenGL » OpenGL/MiniGL Templates

OpenGL/MiniGL Templates

This section is not intended to be a tutorial on OpenGL; there are enough tutorials available elsewhere and links to some of these resources are given below. Likewise, others are in the process of writing tutorials and documentation for MiniGL, so I will not duplicate their effort; once again, links will be provided when they are available. Instead, this section provides a set of templates for getting started with OpenGL using MiniGL.

Learn more about programming in OpenGL. Click here.


To use the templates, you will require the following:


  • An operating system with OpenGL 1.3 or better (some templates may require higher versions)
  • A C compiler with the OpenGL header files

Some of the templates are fully platform independent so the same code should be compilable on any system with GCC, an OpenGL implementation, and GLUT.

OpenGL Utility Toolkit

The OpenGL Utility Toolkit (GLUT), is a toolkit that offers a platform independent API for opening and handling windows for 3D graphics using OpenGL. It also provides a simple method of handling keyboard and mouse events. Whilst dated, GLUT is an excellent way to get started with OpenGL programming. There are newer toolkits that could also be used, but a (incomplete) GLUT implementation is provided as part of MiniGL.

Simple Directmedia Layer (SDL)

An alternative to GLUT, is SDL. It is designed to be a cross-platform multimedia layer that provides fast graphics functions. OpenGL can also be used via SDL. The advantage of SDL over GLUT is that it is more modern and, thus, provides better handling for input devices (e.g., game controllers) than GLUT does, particularly newer devices. It also has an audio library, whereas GLUT does not deal with sound at all. 

Other Cross-Platform Toolkits

There are plenty of other cross-platform toolkits that could be used. However, GLUT and SDL are easy for beginners to get started with. 

The Templates

  • More to follow...


Articles » 3D Graphics via OpenGL » OpenGL/MiniGL Templates