Part II. Application Programming

In each chapter of this part, we outline specific areas of interest for application developers. We begin with the basics of writing VR Juggler applications in general. Then, we move on to the use of different graphics programming interfaces, such as OpenGL and OpenSG, with VR Juggler. Afterwards, we address some additional, but vital, topics such as how to write cluster-capable applications and how to add sound to VR Juggler applications. This part concludes with chapters providing tips on porting applications written using other toolkits such as GLUT and the CAVElibs™.

Table of Contents

4. Application Authoring Basics
Application Review
Basic Application Information
Draw Manager-Specific Application Classes
Getting Input
How to Get Input
Where to Get Input
Tutorial: Getting Input
5. Using Graphics Programming Interfaces
OpenGL Applications
Clearing the Color and Depth Buffers
OpenGL Drawing: vrj::GlApp::draw()
Tutorial: Drawing a Cube with OpenGL
Context-Specific Data
Using Context-Specific Data
Context-Specific Data Details
Tutorial: Drawing a Cube using OpenGL Display Lists
OpenGL Performer Applications
Scene Graph Initialization: vrj::PfApp::initScene()
Scene Graph Access: vrj::PfApp::getScene()
Tutorial: Loading a Model with OpenGL Performer
Other vrj::PfApp Methods
pfExit(): To Call or Not to Call
OpenSG Applications
Scene Graph Initialization: vrj::OpenSGApp::initScene()
Scene Graph Access: vrj::OpenSGApp::getScene()
Tutorial: Loading a Model with OpenSG
Open Scene Graph Applications
Scene Graph Initialization: vrj::OsgApp::initScene()
Scene Graph Access: vrj::OsgApp::getScene()
Tutorial: Loading a Model with Open Scene Graph
VTK Applications
6. Additional Application Programming Topics
Cluster Application Programming
Shared Input Data
Application-Specific Shared Data
General Cluster Programming Issues
Troubleshooting Cluster Problems
Adding Audio
Using Sonix Directly
Using the VR Juggler Sound Manager
7. Porting to VR Juggler from the CAVElibs
The Initialize, Draw, and Frame Routines
Getting Input from Devices
Configuration
Important Notes
Shared Memory
OpenGL Context-Specific Data
Source Code
The Form of a Basic CAVElibs™ Program
The Form of a Basic VR Juggler Program
8. Porting to VR Juggler from GLUT
Window Creation and Management
The Initialize, Draw, and Frame Routines
Getting Input from Devices
Configuration
Important Notes
Shared Memory
OpenGL Context-Specific Data
Source Code
The Form of a Basic GLUT Program
The Form of a Basic VR Juggler Program