GLE Build Notes & General Info

Background and Overview

The GLE Tubing and Extrusion Library is a graphics application programming interface (API). The library consists of a number of "C" language subroutines for drawing tubing and extrusions. The library is distributed in source code form, in a package that includes documentation, a VRML proposal, Makefiles, and full source code and header files. It uses the OpenGL (TM) programming API to perform the actual drawing of the tubing and extrusions.

GLE is known to run on UNIX(r) and UNIX-like operating systems such as Linux, AIX, IRIX, Ultrix and HPUX with OpenGL or Mesa. GLE is also known to run on OS/2 Warp.

Build Notes

To build the library, follow the following steps:
  1. make realclean
  2. make depend
  3. make all
  4. make run

This walk the src directory, and build two libraries, libmatrix.a and libgle.a. It should then move on and build the demo directory, linking in the above libraries and libglut.a. Finally, this will run the demos in the demo directory.

If you have difficulties... here are some notes:

IBM AIX, SGI Irix and Linux Systems
There are no known compile or run time problems. If you have difficulty making on these systems, make sure that OpenGL and GLUT are present. See below.

HP and DEC Systems
When compiled properly, I have been told that there are no known run-time problems on these systems, although I have not personally seen this run on these systems. HP systems require the compiler -Aa flag to be set to obtain ANSI compiler behavior. DEC systems require the compiler -std1 flag to be set to get ANSI behavior. This will help eliminate warning/error messages about function prototypes.

Windows NT and Windows 95
I don't know of any port to these systems nor do I have access to these systems. Since these do support both Mesa and OpenGL, a port should, in theory, be simple. If you have one, please send me the source diffs. (linas@fc.net)

GL and OpenGL libraries
The tubing and extrusion library can be compiled for GL 3.2 or for OpenGL. By default, the Makefile are configured for OpenGL. The Makefiles search for GL/gl.h in /usr/include; if this file is located elsewhere, you will need to modify the Makefiles to point to it. The Makefile assumes that libGL.a is in the default library search path (usually /lib and /usr/lib).

(Warning: the library has NOT been run on GL 3.2 in years, and so might be broken in minor ways. With tweaking, though it should work.)

Obtaining the GL, OpenGL and GLUT libraries
OpenGL is available on most UNIX(R) workstations, as well as OS/2(R) and Windows NT. Contact your workstation vendor for more information; the URL http://www.sgi.com/Technology/openGL/opengl.html points to a variety of information, including a list of OpenGL vendors. GLE also works with Mesa, a public-domain OpenGL-like API. Mesa can be found at http://www.ssec.wisc.edu/~brianp/Mesa.html

The demos require that the GLUT windowing and utility library be installed. GLU can be obtained at http://www.sgi.com/Technology/openGL/glut.html

GLUT Libraries
The demos require the GLUT library and headers to be installed. The Makefiles search for GLUT headers in /usr/local/include, and for the GLUT library in /usr/local/lib

Compile time warnings
You may see some compile time warnings. Ignore these. These occur because not all compilers correctly handle doubly-index subscripts, and so the code does some funny business to get around this. To the best of my knowledge, the code still executes correctly despite these warnings. Note, however, that my efforts to eliminate these warning may result in code that old compilers will not be able to compile, or will compile but not execute correctly.

(In my humble opinion, the way in which the C/C++ language handles doubly, triply, etc. subscripted arrays is fundamentally broken. The syntax is not self-consistent. Many important constructs are undefined by ANSI-C (and C++). In the good old days, when most compilers were broken in this area anyway, you could happily work around this with single-index arrays and fancy address calculation. Now that compilers have been fixed, and, thanks to C++, strict-type-checking is all the rage, the fundamental short-comings of C/C++ in this area start becoming horribly apparent.

To put it another way, I agonized over how subscripting should be handled, and what, if any new types needed to be introduced. Sadly, I was unable to design code that compiled on most compilers, AND not introduce new types, AND avoid strict-typechecking warning messages. Sadly, the result is a horrible mess. )

Hacking

If you want to hack, the place to start is with src/inc/port.h which has all of the portability defines in it. Next, start looking at src/tube/ex_raw.c .. enjoy.

To hack textures, read the documentation, then look at texgen.c


Last updated: Linas Vepstas 12 July 1996