Important CAVE Library Functions

CAVEConfigure (int *argc,char **argv,char **appdefaults)
Reads the CAVE configuration files (in /usr/local/CAVE/etc, and ~/.caverc) and any configuration options in argc/argv & appdefaults. Allocates and initializes all the library's data and shared memory.
CAVEInit (void)
Starts the display and tracking processes, and any other processes managed by the library.

CAVEInitApplication (void (*func)(),int numargs,...)
Passes a pointer to a graphics initialization callback to the display processes. This function will be called exactly once, by each of the display processes, at the beginning of the next frame. CAVEInitApplication() may be called more than once.

CAVEDisplay (void (*func)(),int numargs,...)
Passes a pointer to the scene drawing callback to the display processes. This function is called once per frame for each eye-view being rendered by each display process.

CAVEFrameFunction (void (*func)(),int numargs,...)
Passes a pointer to the per-frame callback to the display processes. This function is called once per frame by each display process, before the drawing callbacks.

CAVEExit(void)
Signals all the CAVE process to halt, and then calls exit().


Display process notes:

The library opens the graphics windows itself when starting the display processes. The windows are initialized in RGB mode, with Z buffering, and are double buffered.
The library sets up the correct off-axis perspective projection (based on the latest tracking data) before calling the application's drawing function. It also takes care of swapping buffers itself, in order to synchronize the multiple display processes. An application's drawing callback should not perform either of these actions.


ball.c - Very simple CAVE program.


Previous page    Next page

Last modified 15 June 1996.

Dave Pape, pape@evl.uic.edu