GLASS (openGL Articulated Structure System) Homepage

(Sourceforge Page)

Hosted by
SourceForge Logo

What is GLASS?

GLASS is a 3D library, designed to make easy use of structured models in open GL applications. What do I mean by structured? That is models, that are made up of nodes linked by basic transforms, for example, rotations and translations. By using GLASS in an application, these models can be loaded, modified, and displayed using a minimum of function calls. GLASS is released under the terms of the GNU GPL.

How do I get GLASS?

The latest version (at the time of writing) is 1.3.1
It is probably a good idea to check the sourceforge page in case I haven't updated this.
The cutting edge version is available by CVS at

After downloading the source, unpack with:
$ tar xfvz glass-VERSION.tar.gz
Enter the directory and compile...
$ cd glass-VERSION/
$ make
Su to root, and install it:
Very important! By default glass installs in /usr/local/lib and most Linux distributions do not contain the line: '/usr/local/lib' in /etc/ so this will have to be added, otherwise the library cannot be found.
# make install
(Optional) To compile the demo programs:
$ cd examples/
$ make

What do the demos do?

All the demos use GLUT to do the displaying, each one gives an example of how to use GLASS.


Hello world for GLASS! Displays a coloured triangle.


A generic GLASS object viewer. Displays a glass object and allows the variables to be modified. Hold l-mouse to rotate the view, r-mouse to zoom. Tab cycles between variables. +/- increments/decrements variables. L toggles lighting. (Esc) quits.


An example of using variables. Displays a (crude) representation of a running person. Same mouse controls as viewer.c. +/- increases/decreases speed of runner. (Esc) quits.


An example of an active point. Displays an articulated arm the randomly moves. The end of the arm has a stream of points coming from it. Same mouse controls as viewer.c. (Esc) quits.

How do I make a GLASS object?

A GLASS object defines is a text file that contains all the information required for one 3D object. It can be modified by hand (see specification), or edited using a GLASS editor. Glazier is currently the only (known) available editor.

The other option is to make an editor using libglassedit
. libglassedit allows you to open GLASS files, modify them using structures and functions, and save the models. Hopefully the header files should be self-explanatory. No tutorial is yet provided, perhaps you should write one :).

How do I use GLASS in my application?

One of the founding ideas of GLASS is that it's easy to use. The interface is based on the openGL interface, and so should be familiar to most users. As with openGL, only the minimal number of functions need to be called, as everything is set up by default. The tutorial explains the interface.

How do I contact the author(s)?

Well the only author is me (at the moment), but I always welcome feedback. Send me any questions/comments/ideas. If you make some GLASS objects, send them to me (under a suitably free license), so I can build an archive.

More on modellers

If you want to use a more powerful (and object-orientated) model library, then you want plib. More specifically you want to look at ssg and ExPoser (currently in early stages of development).

Robert Cleaver Ancell
Last modified: Thu Mar 13 10:58:26 NZDT 2003