CAVELib Applications
Previous  Top  Next


A CAVELib program needs to include the appropriate CAVELib header file - cave_ogl.h for OpenGL programs, and pfcave.h for Peformer programs.

OpenGL programs need to be linked with the OpenGL CAVELib, the OpenGL library, the math library, the X libraries and the pthreads library (e.g. -lcave_ogl_mt -lGL -lX11 -lXi -lm -lpthreads). Additionally,

·HPUX requires a -Aa switch, the -L/opt/graphics/OpenGL/lib directory, and the -lXext library.  
·SUN requires the -L/usr/openwin/lib directory, and the -lsocket and -lnsl libraries.  
 
Please refer to the CAVE/examples/OpenGL/ directory for example Makefile and Windows project files.

Performer programs need to be linked with a Performer CAVELib library, Performer libraries, OpenGL libraries, and the X libraries (e.g. -lpfcave_ogl -lpfdu -lpfutil -lpf -lGL -lXi -lX11 -lm). Additionally,

·LINUX requires the -ldl library.  
·IRIX requires the -limage library and occasionally the -lfpe library.  
·Windows requires the libpfdu-util.lib  
 
Please refer to the CAVE/examples/Performer/ directory for example Makefile and Windows project files.

The CAVELib libraries are compiled for several platforms, IRIX, SUN, HPUX, LINUX and WIN32. All platforms have 32 bit libraries. The IRIX platform specifically uses IRIX's new 32 bit, n32 ABI, also the IRIX distribution includes a 64 bit version of the CAVELib. The OpenGL Performer libraries are only available on IRIX, Linux, and Windows. All libraries reside in either CAVE/lib32/ or CAVE/lib64/, depending upon the bit architecture. Furthermore, the OpenGL versions of the CAVELib come in both a multi-process version libcave_ogl.a and a multi-threaded version libcave_ogl_mt.a. It is recommended that all new OpenGL CAVELib users make use of the multi-threaded library,libcave_ogl_mt.a, as this is the programing paradigm that is prevelent for multi-processor computing. Existing users should likely change from multi-process to multi-threading. Migrating from multi-process to multi-threading is generally painless, since if the application already had proper locks and memory sharing for multi-process it should be ready for multi-threading. Furthermore, the special requirement of shared memory needed in multi-processing is no longer required. So these mechanisms could be removed, although it is perfectly safe to still do CAVEmalloc, in an MT application the CAVELib actually executes a standard malloc when CAVEmalloc is called.

If the Bergen audio classes are being used, the Bergen libraries will need to be linked into the CAVELib application as well. To learn how to use the Bergen audio library, see the documentation, found in Part II, Auxiliary Software section of this manual.

You can also use the Vanilla Sound Server (vss) by the Audio Development Group at the National Center for Supercomputing Applications, by downloading then including vssClient.h (after cave_ogl.h) and linking with the vss library (-lsnd). Further information can be found through the NCSA web site, http://www.isl.uiuc.edu/software/vss/

All CAVELib files are normally found in,

·/usr/local/CAVE for IRIX and LINUX  
·/opt/CAVE for HPUX and SUN  
·C:\VRCO\CAVELib_3.1 for Windows