|
void CAVEConfigure (int *argc,char **argv,char **appdefaults) |
Initializes the CAVE configuration. The CAVE library's internal shared
memory arena is created, the various global variables are initialized,
the configuration files are read, and then any configuration options given
in appdefaults or argc/argv are set (in that order). See
Section 9 for a description of the CAVE configuration
options.
appdefaults is an array of strings; each string should look just like a line in a configuration file. The last entry in the array must be NULL. Options set with argc/argv consist of pairs of arguments; the first argument is the keyword with a leading '-' (eg "-walls"), and the second argument contains the rest of the option (eg "front left"). One additional option available with argc/argv is "-caveconfig", which specifies another configuration file to read. After calling CAVEConfigure, argc & argv will be modified to remove all configuration options, leaving the rest of the command line for the application. NULL may be passed for argc/argv or appdefaults. CAVEConfigure is called by CAVEInit; if you call it directly, you should do so before calling CAVEInit. Only the first call to CAVEConfigure will do anything. After everything has been read, the final CAVE configuration will be printed to stderr. This printout can be disabled by setting the environment variable CAVEDEBUGCONFIG to "OFF". |
|
void CAVEDisplay (CAVECALLBACK function,int num_args,...) |
This function passes the CAVE library a pointer to your drawing routine.
Your routine will be called by the rendering processes once per eye view
per frame (i.e. twice per frame for stereo, once per frame for monoscopic
mode). All rendering should be done from this routine; any GL calls made
directly by the main computation process will have no effect on what is
displayed in the CAVE. CAVEDisplay blocks until the next swapbuffers call
by the rendering processes.
The first argument is a pointer to the drawing routine. The second argument is the number of arguments that the drawing routine receives (5 is the maximum). If your routine does not take any arguments, pass zero (0). The remainder are the arguments to be passed to your routine. These are stored as void *'s, and so MUST be pointers (also, they should use shared memory if they point to values that the computation process may change). CAVEDisplay can only be called after CAVEInit. |
|
void CAVEExit (void) |
Ends a CAVE program. This function will signal all the CAVE processes to
halt, and then calls exit.
|
|
void CAVEFrameFunction (CAVECALLBACK function,int num_args,...) |
This function passes the CAVE library a pointer to a routine which should
be called once per frame. The routine will be called exactly once per frame
whether the CAVE is in mono or stereo mode; it is called at the beginning
of a frame, before both the init and display routines.
CAVEFrameFunction blocks until the next swapbuffers call by the rendering
processes.
The first argument is a pointer to the frame routine. The second argument is the number of arguments that the routine receives (5 is the maximum). If your routine does not take any arguments, pass zero (0). The remainder are the arguments to be passed to your routine. These are stored as void *'s, and so must be pointers. CAVEFrameFunction can only be called after CAVEInit. |
|
void CAVEInit (void) |
Initializes the CAVE environment. This function starts the rendering processes,
and initializes the trackers and graphics. After CAVEInit is
called, the rendering processes are separate from the main computation process;
only the computation process will return to your program from CAVEInit.
|
|
void CAVEInitApplication (CAVECALLBACK function,int num_args,...) |
This function passes the CAVE library a pointer to your graphics initialization
routine. Your routine should do any GL initialization that is required for your
display functions. The rendering processes will call this routine exactly once,
at the beginning of the next frame. CAVEInitApplication blocks until the next
swapbuffers call by the rendering processes.
The first argument is a pointer to the graphics initialization routine. The second argument is the number of arguments that the graphics initialization routine receives (5 is the maximum). If your routine does not take any arguments, pass zero (0). The remainder are the arguments to be passed to your routine. These are stored as void *'s, and so must be pointers. CAVEInitApplication should be called after CAVEInit, and before CAVEDisplay. |
|
void CAVEStopApplication (CAVECALLBACK function,int numargs,...) | This function is used to suspend an application's display processes without actually exiting. It clears the display, initialization, and frame functions (set by CAVEDisplay, CAVEInitApplication, & CAVEFrameFunction), and then has the display processes call function. This routine will not return until after function has been called. Note: you do not have to call CAVEStopApplication before exiting a CAVE program, unless you want the graphics processes to call a "clean-up" function. |