Click for more information

CMSC 427
Computer Graphics
Dave Mount
Spring 2004

Home

 

OpenGL and General Graphics Information

 

The first two programming will involve the use of the OpenGL graphics library, and the associated GLU and GLUT libraries. These libraries are available on all the major platforms (albeit in different locations). There is a freely available version of OpenGL available on the web (see the links below) called Mesa.

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 around here.

WAM and Glue Labs:
Mesa and GLUT can be found in /usr/local/Mesa. The libraries are in the lib subdirectory under the names libMesaGL, libMesaGLU, and libglut, and the include files are in the include/GL subdirectory under the names gl.h, glu.h, and glut.h.
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.

PC's with Visual C++:
OpenGL 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). Once the files are set up, here is short tutorial from George Washington University 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.)

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.

CSD Junkfood Labs:
OpenGL and GLUT can be found in various directories, depending on the operating system. (These machines are only accessible to CS grad students.)

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.

Mesa and 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:
(3rd Edition), by Dave Shreiner, et al., Addison-Wesley, 1999. 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.

Mesa and OpenGL Documentation on the Web

Sun's OpenGL Documentation.
A good reference for OpenGL and GLU 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 and GLU Manual Pages.
Courtesy of Cal Poly State.
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.
My own OpenGL quick reference guide
This is guide that I put together. Let me know if you spot any errors.
Personal OGL Tutor:
An OpenGl tutor software written in Tcl/Tk, written by a student at University of Minnesota. (Requires installation.)

JOGL

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.

General Graphics Links

The list below contains links to other sources of information about computer graphics. Suggestions for additions are welcome.

OpenGL Supplementary Information (from a previous edition of Hearn and Baker).
Yahoo's Computer Graphics:
Yahoo's links to computer graphics and graphics software.
Real-time Rendering:
A web page that accompanies the book of the same title. Contains lots of information and pointers to interactive graphics. Also check out the 3-d object intersection page for information on how to compute geometric intersections.
Computer Graphics FAQs:
Links to various FAQ's (answers to frequently asked questions) on computer graphics.
427/828 Art Gallery:
Images from previous semester projects.