The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers


GLUT - The OpenGL Utility Toolkit

2000/03/22 - GLUT 3 specification is now available in PDF format!

About GLUT . . .

GLUT (pronounced like the glut in gluttony) is the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL programming. GLUT provides a portable API so you can write a single OpenGL program that works on both Win32 PCs and X11 workstations.

GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits like Motif. GLUT is simple, easy, and small. My intent is to keep GLUT that way.

The GLUT library supports the following functionality:

  • Multiple windows for OpenGL rendering.
  • Callback driven event processing.
  • An `idle' routine and timers.
  • Utility routines to generate various solid and wire frame objects.
  • Support for bitmap and stroke fonts.
  • Miscellaneous window management functions.

The GLUT library has both C, C++ (same as C), FORTRAN, and Ada programming bindings. The GLUT source code distribution is portable to nearly all OpenGL implementations for the X Window System and Windows 95 and NT. GLUT also works well with Brian Paul's Mesa, a freely available implementation of the OpenGL API.

Because GLUT is window system independent (as much as possible), GLUT can be implemented for window systems other than X. Implementations of GLUT for OS/2, NT & Windows 95, and the Mac have ben implemented, but only the Win32 and X11 versions are part of the official GLUT source code distrbution.

The current version of the GLUT API is 3. The current source code distribution is GLUT 3.7.

Obtaining the GLUT source code distribution

GLUT is distributed in source code form; compiled libraries for Win32 are also available. The current version, 3.7, is in late beta. The programs and associated files contained in the distrbution were developed by Mark J. Kilgard (unless otherwise noted). The programs are not in the public domain, but they are freely distributable without licensing fees. These programs are provided without gurantee or warrantee expressed or implied.

Download the GLUT 3.7 beta source distribution (shift Left in Netscape) (Unix tar format) (Windows ZIP format).

Since the data files for some of the new advanced GLUT examples are large, they are contained in a separate distribution.

Download the GLUT 3.7 beta image datafile distribution (Unix tar format) (Windows ZIP format).

You can still download the previous version of GLUT (GLUT 3.6), and the GLUT 3.6 data files.

You can also download GLUT from the University of North Carolina, Chapel Hill's SunSITE archive by either FTP or HTTP:

WARNING: GLUT 3.7 and GLUT 3.6 are not on yet (just GLUT 3.5 currently).

Pre-compiled installable images for SGI users

For SGI users that want to save the hassle of compiling GLUT 3.6 by hand, you can download installable images for GLUT 3.6. Image images include:

  • glut_dev.doc.intro - PostScript introduction to programming with GLUT 3.6.
  • glut_dev.doc.spec - PostScript specification for the GLUT API, version 3.
  • - Unix man pages for the GLUT programming interface
  • glut_dev.src.samples - Source code for selected GLUT examples.
  • glut_dev.src.inventor - Source cofr for Inventor GLUT examples.
  • glut_dev.sw.demos - Pre-compiled GLUT demos.
  • - The GLUT 3.2 development environment.
  • glut_dev.sw.fortran - GLUT FORTRAN bindings.
  • glut_dev.sw.ada - GLUT Ada bindings.
  • - For IRIX 6.x users, N32 version of GLUT library.
  • glut_dev.sw32.fortran - N32 version of GLUT FORTRAN bindings.
  • - For 64-bit IRIX 6.x users, 64-bit version of GLUT library.
  • glut_dev.sw64.fortran - 64-bit version of GLUT FORTRAN bindings.

The GLUT 3.6 images work with IRIX 5.3, IRIX 6.1, IRIX 6.2, IRIX 6.3, and IRIX 6.4. The installable images make it easy to install, upgrade, and remove GLUT. This is particularly true if you want N32 or 64-bit versions of GLUT. The N32 version refers to the new N32 object format that results in better performance from MIPS's current R4400, R8000, and R10000 processors. N32 is supported in IRIX 6.1 and later IRIX releases. The system is now marked for install by default since N32 is the default object format in IRIX 6.4.

The images are distributed as a tar file. You can either untar the file, or run tardist on the tar file to automatically start SGI's Software Manager (swmgr). Otherwise, you can run inst or swmgr on the untar'ed files.

Download the GLUT 3.6 installable images by downloading this (shift Left in Netscape).

If your browser is configured to use tardist, try clicking the above link to start swmgr automatically. Note that not all the GLUT example source code in the source distribution is included with the GLUT images.

Pre-compiled binaries for Solaris users

Ron Bielalski has built binaries of GLUT 3.7 beta for Solaris on SPARC processors in both 32 bit (16.5 MB) and 64 bit (18.3 MB) forms. John Martin has built binaries of GLUT 3.7 beta for Solaris on x86 in both 32 bit (15.2MB) and 64 bit (17.4MB) and forms. Note that these files are very large - they contain a completely built GLUT source tree, including all source and object files as well as the final headers and libraries. Please direct questions about GLUT for Solaris to

GLUT for Microsoft Windows 9X, ME, 2000, NT & XP users

Nate Robins and Paul Mayfield with help from Layne Christensen have implemented the original version of GLUT for Win32 (Windows 95,98,Me,NT,2000,XP). Here's a link to their GLUT for Windows web page. These pages include GLUT for Win32 dll, lib and header file (everything you need to get started programming with GLUT) and GLUT source code distribution (including a whole slew of great example programs + data).

The most signficant update to GLUT is the integration of the X Window System and Win32 versions of GLUT in a single source tree. GLUT works for either Win32 or X11 now. Nate Robins deserves the credit for this merging. To help Win32 users better utilize GLUT, PC-style .ZIP files are available for download.

Download the zipped GLUT 3.7 source code distribution:

Download the GLUT 3.7 image datafile distribution:

You will need a PC unzip utility that understands long file names to unzip these files correctly. Once you have the file unzipped, consult the file.

If you want just the GLUT header file, the .LIB, and .DLL files all pre-compiled for Intel platforms, you can simply download the file (149 kilobytes).

You can still download the previous version, GLUT 3.6:
Download the zipped GLUT 3.6 source code distribution:
Download the GLUT 3.6 image datafile distribution:
Download the GLUT 3.6 headers and pre-compiled libraries:

You can also download pre-compiled GLUT 3.6 libraries for Windows NT Alpha platforms by downloading (82 kilobytes). GLUT for Alpha questions should be directed to Richard Readings (

Available GLUT Documentation

The OpenGL Utility Toolkit (GLUT) Programming Interface, API version 3 specifies all the routines in the GLUT API and how they operate. This document is available in HTML, PostScript, and PDF formats (the PDF version was generated and contributed by Richard Banks - thanks!). There have been no revisions since GLUT 3.2.

There is also a column on GLUT published in The X Journal available in PostScript. Unfortunately, The X Journal is no longer published, but back issues contain various other OpenGL columns using OpenGL with GLUT.

GLUT is fully described in the book Programming OpenGL for the X Window System (Addison-Wesley, ISBN 0-201-48359-9). Consult this book for a full tutorial on GLUT.

What did GLUT 3.0 add?

GLUT 3.0 involves an update to the GLUT API to version 3 so the GLUT library has new routines included in it implementing new functionality. There are also bug fixes, better support for IRIX 6.x's 64-bit and N32 object formats, and more sample programs.

The important new API additions are support for overlays, determining font character widths, new bitmap fonts, returning held down modifiers for mouse and keyboard events, and full screen windows.

What did GLUT 3.1 add?

There are a few minor bug fixes in the library. Various build problems on various built platforms have been resolved. GLUT 3.1 should build much cleanly on HP/UX, AIX, Linux, Solaris, and SunOS platforms now (cross finger). There are also a few more example programs. See the CHANGES file for details.

What did GLUT 3.2 add?

GLUT 3.2 fixed a few more minor bugs in the library. Mesa users will benefit from a hack to speed double-buffered damage regeneration. Man pages for the complete GLUT API are now included. The tests are expanded. New examples from Mesa distribution (converted to use GLUT) and advanced OpenGL programs from the Advanced OpenGL Rendering SIGGRAPH '96 class are now included. See the CHANGES file for details.

What did GLUT 3.3 add?

GLUT 3.3 is more portable; nearly all compiler warning are resolved. Lots of new GLUT-based OpenGL examples have been added or improved. Some new API has been added that will be codified with the GLUT 4 API revision. For example, an API for using InfiniteReality's dynamic video resize (DVR) capability is included. Also, a better way of getting window status is supported. There were some bug in the GLUT library itself that are now fixed. Some the warning or error messages weren't quite right. glutFullScreen before a window is first displayed now ensures that the window need not be positioned by the user. See the CHANGES file for details.

What did GLUT 3.4 add?

An Ada binding for SGI machines is included along with an Ada example. Many new sample programs. Several such as dinoshade.c demonstrate real-time rendering techniques relevant for games. Examples using Sam Leffler's libtiff library for loading, drawing, and writing TIFF image files. GLUT version of the facial animation "geoview" decibed in the Parke and Water's book Computer Facial Animation. New API interfaces to be made part of the GLUT 4 API update (not yet fully finalized though). glutInitDisplayMode for example. Improved portability and a few bug fixes.

What did GLUT 3.5 add?

The most significant change with GLUT 3.5 is unifying the X Window System and Win32 versions of GLUT into a single source code distribution. Henk Kok contributed several cool new demos (rollercoaster, chess, opengl_logo). All the demos build cleanly under Win32. Lots of bug fixes. Interesting new OpenGL rendering techniques are demonstrated in a number of new examples: movelight, dinoshade, halomagic, rendereps, movelight, shadowfun, torus_test, underwater, texfont, reflectdino. Also, Tom Davis contributed a user interface library called microUI (MUI) that is layered on top of GLUT.

What did GLUT 3.6 add?

GLUT 3.6 has substantially improved the Win32 GLUT compliance and performance. Windows 95 & NT users should find GLUT 3.6 a substantial improvement over GLUT 3.5's Win32 support. Lots more demos and examples have been added. glflare is a notable addition. Linas Vesptas's GLE Tubing and Extrusion library with documentation and example programs is now a part of GLUT. Many minor bugs were fixed.

What did GLUT 3.7 add?

GLUT 3.7 adds a full-screen game mode for programs which wish to take over the entire display. The glsmap library for dynamic real-time sphere mapping is included, along with demos showing how to use glsmap for multiple reflections. A port of the Iris GL "wave physics" demo by Erik Larsen and a red-blue stereo demo program from Walter Vannini are included. Man pages are updated, and missing entry points added to the GLUT Ada bindings. Win32 performance improvements and bug fixes.

Frequently Asked Questions

I've collected a page of GLUT frequently asked questions that I expect about GLUT 3.6.

Example Contributions Accepted

If you have benefited from using GLUT and have developed a cool GLUT program that you would like included with a future GLUT source code distribution, feel free to notify me by email about including it.

Reporting Bugs

Please send email to to report bugs or problems with GLUT. Win32 GLUT programs can be sent to Nate Robins at

(We make no promises to fix bugs quickly or even at all, though we usually do.)

Column Header
Column Footer