GLUI User Interface Library

by Paul Rademacher

Maintained by Nigel Stewart


Click here to get the latest version of GLUI


What is it?

GLUI is a GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications. It is window-system independent, relying on GLUT to handle all system-dependent issues, such as window and mouse management. Features of the GLUI User Interface Library include:

- Complete integration with GLUT toolkit
- Simple creation of a new user interface window with a single line of code
- Support for multiple user interface windows
- Standard user interface controls such as:
      - Buttons
      - Checkboxes for boolean variables
      - Radio Buttons for mutually-exclusive options
      - Editable text boxes for inputting text, integers, and floating-point values
      - Spinners for interactively manipulating integer and floating-point values
      - Static text fields
      - Panels for grouping sets of controls
      - Separator lines to help visually organize groups of controls
- Controls can generate callbacks when their values change
- Variables can be linked to controls and automatically updated when the value of the control changes ("live variables")
- Controls can be automatically synchronized to reflect changes in live variables
- Controls can trigger GLUT redisplay events when their values change
- Layout and sizing of controls is automatic
- Controls can be grouped into columns
- User can cycle through controls using Tab key

What's it look like?

Here's an example GLUI window, showing the different controls. This window is rendered entirely in OpenGL. It therefore looks the same on PCs, Macs, SGIs, and other Unixes, using either SGI's implementation of OpenGL, Microsoft's, or Mesa's.



New in version 2


GLUI version 2 includes the following new features and controls:

- GLUI controls within the main graphics window.
- Functions for cleanly destroying GLUI windows and subwindows.
- Functions for hiding and showing GLUI windows and subwindows.
- A sync_live_all() for automatically synchronizing all live variables in all GLUI windows simultaneously.
- Rollouts - collapsible panels for reducing screen clutter.
- Listboxes - allows the user to choose an item from a list of strings.
- Rotation and translation controllers - for easily receiving 3D interaction input from the user.

Here is a screenshot (from Windows) showing all the GLUI version 2.0 controls:



And another screenshot (from X-Windows/Mwm), showing the new features, including GLUI subwindows docked inside the main graphics window.



Where can I get it?

   The latest version is on SourceForge, courtesy of Nigel Stewart and Bill Baxter. You can access it here


      In case you need it, here's Version 2.1 (old):  .tar.gz file  .zip file  Just the manual

License info

GLUI is licensed under LGPL



OpenGL Programming

Here's some guides and references to 3D graphics programming using OpenGL:
The OpenGL "Red Book" - The must-have reference for OpenGL programmers The OpenGL "Blue Book" - The other must-have reference. Describes in detail every OpenGL function call.
"Computer Graphics Using OpenGL" - An introduction to OpenGL and graphics programming. Also touches on ray tracing. "Interactive Computer Graphics: A Top-Down Approach with OpenGL" - Another introduction to graphics programming with OpenGL.
"3D Game Engine Design" - a new book by David Eberly, a UNC alumnus. He has an huge collection of well-designed plug-and-play code for graphics apps, which is included on CD-ROM. OpenGL SuperBible
     



FastCounter by bCentral