pebbles image

This page is under construction and some links may not work.

OpenGL and General Graphics Information

The OpenGL and GLUT libraries are widely available libraries for interactive graphics. There is a freely available version of OpenGL available on the web called Mesa (see the links below).

To get started quickly, we have provided a Sample OpenGL Program, which you can downloaded. The file contains both the sample program and instructions for compiling it on the various platforms given below.

Here is more information on where to find OpenGL and GLUT on the various systems at the University of Maryland.

PC's with Visual C++:
OpenGL/GLU comes bundled as part of Microsoft Windows. There are three basic elements:
  • Dynamic link libraries files opengl32.dll and glu32.dll are stored in the main system directory where other dlls are stored (e.g., C:\WINDOWS\system32).
  • Lib files opengl32.lib and glu32.lib are stored somewhere accessible to your linker (e.g., C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib).
  • Definition files opengl32.h and glu32.h are stored somewhere accessible to your C/C++ compiler (e.g., C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\gl).

The glut library (glut32.dll, glut32.lib, and glut.h) are not part of the standard Windows, but can be downloaded for free. (See the GLUT information below). Here are two pages with information on setting up and using OpenGL on Windows systems.

Here is a web page from the University of Iowa on how to install GLUT. Note that users with 64-bit machines will need to place glut.dll in a different directory than the one listed there. (On my 64-bit machine, I had to place glut.dll in the directory "C:\Windows\SysWOW64".)

Free versions of Visual Studio 2010 can be downloaded from Microsoft Dreamspark. This provides a C++ compiler, IDE, and a good debugger. You will need set up an account with Windows Live and specify your institution as the University of Maryland. I downloaded Visual Studio Express 2010, and it seems to work fine.

CSIC Linux Labs:
In the CSIC Linux Labs, the OpenGL and Glut headers files are located in /usr/include/GL (glut.h, gl.h, and glu.h) and the libraries are located in /usr/lib (,, and The OpenGL include files are located in /usr/include/GL and the Glut include file is located /usr/local/freeglut/include/GL. (Redhat dropped support for Glut because it was too hard to configure and compile. Freeglut is essentially the same, and much easier to work with.)
Mac OS with Xcode:
Mac OS provides OpenGL, GLUT, and a C++ compiler through Xcode, which is freely available. Here are instructions for creating an OpenGL project with C++ and GLUT.
  • Get XCode
  • In Xcode, do → New Project → OS X Application → Command line tool (type C++ stdc++)
  • Right click your project on the left, add frameworks "OpenGL" and "GLUT"
  • Write your code in the main file (e.g., copy and paste the sample C++ code)
  • Use these headers: "#include <GLUT/GLUT.h>" and "#include <OpenGL/OpenGL.h>"
  • Build and Run

If you want to run OpenGL on a Unix platform or under Visual C++ on your own system, you may need to install one or more of these libraries. Here are some pointers that provide information about OpenGL, Mesa, and GLUT.

OpenGL Links

OpenGL Home Page:
Lots of information about OpenGL.
Mesa Page:
Check here for documentation Mesa, a freely available implementation of OpenGL.
OpenGL "Red Book"
The official title is the "OpenGL Programming Guide", but it is widely called the "Red Book."
OpenGL "Blue Book"
The official title is the "OpenGL Reference Manual", but it is widely called the "Blue Book." It is the Official Reference Document to OpenGL.
NeHe Productions Game Development Page:
Lots of information about OpenGL and game development in general, along with useful tutorials.

The GLUT Toolkit

Nate Robins GLUT for WIN32:
The easiest way to download GLUT for Windows (9X, ME, NT, 2000, and XP). See the README-Win32 file for an explanation of where to put the various files.
GLUT Home Page:
Contains information on downloading and installing GLUT, an toolkit library for OpenGL, which will be needed in our projects. (This contains pre-compiled binary downloads for both Solaris and Windows 9X, 2000, NT and XP.)
freeglut Home Page:
freeglut is a completely OpenSourced alternative to the GLUT library. It is particularly recommended for Linux users.

OpenGL Documentation on the Web

OpenGL Documentation:
A good reference for OpenGL, GLU, and GLUT commands.
Microsoft MSDN OpenGL Documentation:
This contains both reference material on OpenGL and Glu. (If this link is broken, go to the MSDN Library Page and search for "OpenGL".)
OpenGL Tutor:
This is a program (by Nate Robbins) that allows the user to interactively adjust various OpenGL settings and see the results. (Installation required.)

-   CMSC 427 Home   -

Web Accessibility