At this point, our example file has all the information needed to start up a simple, OpenGL-based VR Juggler application. If you've been following along, making a configuration file for your own VR system, you may want to give it a try with one of the sample programs in VR Juggler's samples directory.
The next sections discuss configuration options for using other graphics APIs (primarily OpenGL Performer) and for enabling some of VR Juggler's advanced features, such as dynamic reconfiguration.
VR Juggler includes a handful of configuration options specifically for applications that use the OpenGL Performer™ graphics API. To configure these features, open the API-specific folder and create a Performer API chunk. This chunk lets you choose the model files (e.g. in ".flt" format) that should be used to represent the user's head and wand position in simulator mode. Example model files are provided in $VJ_BASE_DIR/share/Data/models.
The API-specific folder also contains two ConfigChunk types for configuring VR Juggler's built-in audio capabilities - one for the AudioWorks driver, and one for the SL sound driver. See Sonix: Juggler Simple Sound Interface for more information.
Just below the API-specific folder is the Environment Manager folder. The Environment Manager is part of VR Juggler's dynamic reconfiguration capability. When it is activated, VjControl can connect to the application to monitor its performance or change its configuration.
To enable this feature, first create an Environment Manager chunk. This ConfigChunk has two important properties. The first is the Port - the network port that the application will use to listen for connections. You also need to supply this number to VjControl when it tries to open a connection. This argument is typically an integer between 1024 and 65535. The second important property is Accept Connections. Obviously, this should be set to True if you want to use VjControl's monitoring and control capabilities.
Another service provided by the the Environment Manager is performance monitoring of VR Juggler applications. Using VR Juggler's performance monitoring capabilities requires two simple steps.
First, we need to tell the application which kinds of performance data to gather. There are three basic categories:
Kernel - collect statistics about VR Juggler's kernel thread. This includes several application-specific functions that are called by the kernel thread.
vjGlPipe - statistics about VR Juggler's drawing threads for OpenGL applications. Includes information about the draw() methods supplied by applications.
Head Latency - information about the latency of the user's head position data used to draw the scene.
These categories can be individually activated and deactivated with a Performance Measurements ConfigChunk (which you can create under the Environment Manager folder in VjControl's config file editing window) - see Figure 2.7.
Secondly, we must tell VR Juggler where to send the performance data once it is collected. This is determined by the Performance Target property in the Environment Manager ConfigChunk. If we are dynamically reconfiguring VR Juggler so that we can view performance while the application is running, the pulldown menu for the Performance Target property will list the network connection between VjControl and the application as a possible target. If that connection is selected, performance data can be viewed in a panel in VjControl (click on the Performance tab).
We can also send performance data to a file for later evaluation. To do this, first create an EM Connection ConfigChunk (found in the Environment Manager folder in VjControl). This chunk is illustrated in Figure 2.8. Here we can select the name of the output file and tell VR Juggler to "activate" it - that is, to open it and write to it. Note that the File Mode property should always be "output" for a log file.
Once we have created the EM Connection for our log file, we can return to the Environment Manager ConfigChunk and select it as our target for performance data. The output file that results from running the application with this configuration can be loaded into VjControl's Performance panel for analysis.