The Walkthru Project
GLVU is a C++/OpenGL/GLUT based viewer that various members of
The Walkthrough Group at UNC CS have been developing to serve as
a common platform for our
research. We are making it available to you because that's just the
kind of people we are. And because we want to assimilate you.
Browse the list of versions available.
Archives are named according to the date they were checked out and created.
There are a few different subsets of the glvu source:
The snapshots of the CVS archives are made periodically by a highly
- glvu_core_* is just the basic stuff you need to make a 3D app.
This contains only the code for the standard viewer (mouse interaction, camera control, etc.)
- qglvu_core_* is the same a glvu_core but the Qt 2.3 version rather
than GLUT version.
- glvu_all_* is the full GLVU
This contains the standard GLVU package and all the extension modules
(most of which you will have absolutely no use for. Guaranteed.)
Rather than being one massive "3D Engine", GLVU provides a number of
utility libraries that are handy to have for 3D graphics programming with
OpenGL. Basically we have no idea what you're going to try to do with
OpenGL, and we don't want to limit you. So you can use all these components
together, or just take bits and pieces that do what you need.
Here are the main pieces it has:
If you want to manipulate a 3D scene, but don't want to worry about
how to turn mouse movements into 3D navigation, then the GLVU/glvu
viewer stuff is for you. If, on the other hand, you want to handle camera manipulation
completely on your own, then forget about glvu/glvu, but you still may
want to use glvu/math, glvu/fileutils, and glvu/timer libs. The point
is you don't have to use it all. If you just need to load and save a
few images, for instance, just grab the glvu/images code. Or if you
need more complicated image handling, chuck glvu/images and use ImageMagick or DevIL. It's up to you! The
GLVU libs play nice with others for the most part. Happy coding!
- The viewer (glvu/glvu or glvu/qglvu subdirectory). The viewer
allows you to create GL windows easily and includes a number of routines
for turning keyboard and mouse input into 3D navigation.
- Math libs (glvu/math,glvu/math_objs). Every 3D toolkit has to
come with its own Vector and Matrix classes, why should GLVU be any different?
Includes 4x4 matrix, 3x3 matrix, 4-vector, 3-vector, and quaternion classes.
Also has routines for operating directly on arrays of floats rather than
particular class types. GLVU/math_objs has a few graphics primitive classes
like plane, triangle, and axis-aligned bounding boxes, and these
provide various routines for things like intersection testing.
- Image libs (glvu/images subdirectory). The image libraries
have simple routines for reading and writing a few different image formats
(PPM,PGM,TGA,RGB). TGA supports alpha, which is handy.
- Object loading (glvu/object). The object libs give you
a way to load a few common 3D file formats. Nothing too
sophisticated in terms of material handling, but enough for quickly
getting a model with vertex colors and normals loaded up. Support
for TRI, OBJ, VRML1, and even some homebrew NURBS format.
(Although I don't know if any of those
completely support their respective specs -- there's definitely no
support for textures, sadly).
- File libs (glvu/fileutils). Some cross-platform routines for
searching directories, and manipulating filenames.
- Thread lib (glvu/thread). An OK thread library that works
- Timer class (glvu/timer). Time your code to see how long stuff
- GL Utilities (glvu/glutils). Handy functions for managing
textures and doing framebuffer readback and stuff.
- Other stuff . Various other things that may or may not be
useful like a Camera class, environment map class, projective texturing
code, and textured depth mesh code. It was all useful to
someone at sometime!
Project files and workspaces are included for MSVC 6.0 in the
glvu/MSVC6 directory. The directory contains two MSVC workspaces,
one builds the GLVU libraries (libs.dsw), the other builds the
There is also a directory called MSVC5 which has project files for
Microsoft Visual C++ version 5.0, but these files are not actively
maintained and likely will not work without some tweeking.
We have set up the project files to link GLVU against the
"Multithreaded DLL" run-time libraries rather than the default
"Single-Threaded" versions. Prior versions of GLVU were configured to
use the "Single-Threaded" run-time libraries. The change was made to
allow for greater flexibility: it is still possible to write
single-threaded programs when linking against the multithreaded
run-time libraries, but the opposite is not true. Since there's no
real significant disadvantage to using the multithreaded run-time
libraries as far as I know, it is better for us to make that the
You change the run-time libraries in your projects by going to the
"Project Settings" dialog in Visual Studio, to the "C/C++" tab, under
the category "Code Generation". There where you see "Use run-time
library" change the drop-down to "Multithreaded DLL" for the Release
build and "Debug Multithreaded DLL" for the Debug build.
The way I usually use glvu on windows is to compile it in some directory,
say c:\usr\pkg\glvu, then set a GLVUDIR environment variable
in Windows to that dir. Then in the Project Settings, C/C++ tab,
under "Preprocessor" I add $(GLVUDIR)/include, and under the Link tab,
under "Input", I add $(GLVUDIR)/lib. Actually I do that for just about
every external library I link against, and it works pretty well.
The current makefiles rely on features only available in the GNU
version of make. If you don't have that on the platform you are
using, you should. It has been ported to far far more platforms than
GLVU ever will be.
To build, just type gmake (or make if that's what your version of GNU
make is called). If it doesn't do what you expect then you
should read the README.ubermake file that comes in the distribution.
Note that QGLVU hasn't been tested on UNIX, and probably will require
some tweaking, especially in the Makefiles department.
The standard GLVU viewer uses GLUT for window
management. GLUT is nice and easy to use, and quick to get up and
running with, but it is not maintained by its author any more (the last
update was 3.7.6 relased in 2001). It's really showing its age, with
no support for common UI features such as the mouse wheel. If you use
the standard GLVU viewer, then you will be stuck with these sorts of
The Qt version of the GLVU viewer, QGLVU, is based off of Qt 2.3,
which is also really old at this point.
Reports are that QGLVU won't compile with the latest version of Qt
(3.3 at the time of this writing).
If anyone feels inspired to contribute patches to make it work with 3.3,
please do! If you're here at UNC, I (baxter at cs) would be glad to help
you get it working.
But the bigger problem is that TrollTech has made Qt free on Linux, but
not on Windows.
The most recent version of Qt that was freely available on Windows is the
2.3 Non-Commercial version.
(which is hard to find on their web site, but
still available for dowload here). Apart from that,
rumor has it that this book on Qt comes with a non-commercial
edition of 3.3, but that seems to only be available to book purchasers at this
If someone is looking for a little project that could benefit the
masses, it would be REALLY REALLY nice to have ports of the GLVU
viewer for some of the other window toolkits out there, like wxWindows, or FOX, or FLTK. All three of those toolkits are
completely free (unlike Qt), and are also actively maintained (unlike
GLUT). Porting the viewer only involves making changes to things that
are in the glvu/glvu directory. Probably the best way to go about it
would be to copy the QGLVU setup, since constructs in Qt will pretty
much map 1-to-1 with things in wxWindows and FOX. FLTK is the only
questionable one since it uses C-stlye callback functions (more like GLUT),
while the others have event methods that are members of classes
(more like Qt).
We have started creaing API documentation for GLVU using doxygen. The results can be
You can refer to the older (very incomplete) documentation here. Be prepared for plenty of
In the meantime, if there is a question that the manual doesn't
answer yet, you can refer to the example programs included in the
standard GLVU distribution. These are located in the glvu/examples
last updated: 6 Feb 2004 3:33pm
Direct any questions about this site to the walkthru webmaster.