CMSC 427: Computer Graphics

Spring 2006

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, there is 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. The libraries are stored in two forms, as .dll files and .lib files. The .dll files are stored in the main system directory (where all the dll's are stored. Do a search for "opengl32" or "glu32" to locate them on your system. The include files are stored in the main Visual C++ directory in the directory 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.
  • from GWU on how to create a program in Visual C++ using OpenGL and GLUT. (BEWARE: This has a link to an old version of Glut. You should use the link below to Nate Robbins Glut page to download the latest version.)
  • from Virgina Tech on how to install OpenGL and GLUT.
Thanks to Evan Golub, we have been provided with free academic licenses for Visual Studio 6 and Visual Studio.NET, both of which provides a Visual C++ compiler. To obtain a copy, send me email. I'll send you an account and password, which will allow you to download and install the software from the following page:
http://msdnaa.cs.umd.edu:8000/software/cmsc427.shtml
The download takes a long time. If you have a slow connection, I have CD's, which can be checked out overnight.
CSIC Linux Labs:
In the CSIC Linux Labs, the OpenGL library files are located in /usr/X11R6/lib and the Glut library /user/local/freeglut/lib. 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.) We have also installed JOGL, a Java binding for OpenGL. Note that it does not include Glut, so it is necessary to implement glut functions using the Java AWT toolkit. The .jar file and library files are located in /usr/local/jogl-linux.
WAM Labs:
OpenGL has been installed on some of the machines in the WAM labs, but not all have all the libraries that we need. Until these libraries are installed, we do not recommend using the WAM lab (or Glue lab) machines.

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 and how to download 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." Authors: Woo, Neider, Davis, and Shreiner. This book is on reserve in the Computer Science Department Library (in AVW 3164), but you might consider buying it if you plan to do more OpenGL programming.
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. It is also on reserve in the Departmenal Library (AVW 3164).
Lighthouse 3d:
Good information about OpenGL and graphics in general. Some good tutorials on nifty effects using 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 recommened for Linux users.

OpenGL Documentation on the Web

Sun's 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".)
GLUT Home Page:
The GLUT home page also contains complete documentation on GLUT, given both in html and pdf formats.
OpenGL Code Samples:
From the OpenGL web page.
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.)

JOGL

We will not be using Java or JOGL this semester. But, if you are interested, here are some links.

JOGL Home Page:
JOGL is an OpenGL binding for Java, that is, it provides a way to access the OpenGL libraries (including GLU) directly from within a Java program. This page provides basic information about JOGL, some demos, and how to download it. (Warning: Some of the demos require special graphics card features.)
Jumping into JOGL:
This is about the best (and in fact about the only) tutorial I have seen on installing and using JOGL. Some of the information is outdated, so beware.