VR Juggler is an object-oriented development environment to support the efficient development of time-critical, interactive immersive applications independently of the underlying technologies. We discuss the VP concept in the context of prototyping, debugging, and running immersive applications and focus on the approach taken to specify, design, and implement VR Juggler.
The fundamental metaphor of VR Juggler is that VR Juggler is a virtual platform for VR application development.
A virtual platform (VP) provides a development and execution environment that is independent from hardware architecture, operating system (OS), and available VR hardware configurations. It provides a unified operating environment in which developers can write and test applications using the available resources while guaranteeing the portability of the application to other resources.
The VR Juggler virtual platform (JVP) addresses the following key technical challenges (See Appendix A for more information about these needs)
Abstract the complexities of the current VR system
Allow the use of any graphics API
Provide for scalability of VR systems and resources in terms of the number of display surfaces, computer systems, human/computer interface equipment, networks, and software tools.
Provide flexibility to adapt and cope with a wide variety of hardware configurations
Allow for run-time changes in the hardware and software configuration of the environment
Provide the ability of running multiple applications simultaneously
Provide tools for evaluating and tuning the performance of the VR Juggler system and the applications that use it.
The purpose of the VR Juggler virtual platform (JVP) is to separate the hardware-dependent and hardware-independent software components of the VR software system. The virtual platform provides a simple operating environment for virtual reality application development. By using the JVP, a developer can write an application once on a local VR system and run it on any other VR system.
The JVP design has the following characteristics.
The basic JVP system () is composed of an application object, a draw manager, and the VR Juggler kernel. The interface between the application object and the JVP consists of the kernel interface that provides the hardware abstraction for the virtual platform, and the draw manager that provides the abstraction for the graphics AP (Figure 1).
The JVP kernel interface provides all application accessible functionality except for graphics API specific features. The kernel itself is responsible for controlling all components in the VR Juggler system. Because the kernel controls all the other VR Juggler components, its interface provides the virtual platform API for the hardware-specific details of the environment. Because the kernel interface is the only way the application accesses the hardware, it is possible to change the implementation details of any component of VR Juggler as long as the kernel interface remains the same.
The kernel does not depend upon any graphics API specific details, instead it captures all of these in the draw manager, which is an external manager of the VR Juggler kernel. Applications use the draw manager portion of the virtual platform interface to access any API specific details that are needed.
The virtual platform interface means that application code does not have to change when new system features are added or even when running on a different VR system. The virtual platform in VR Juggler separates the application developer from the system details that can change. Since the virtual platform consists of the kernel and the draw manager, we have the freedom to change any details of the VR Juggler system as long as the interfaces to the draw manager and the kernel remain the same. As long as the interface looks and behaves the same, the application can never see or rely upon any details hidden by the virtual platform. This provides VR Juggler applications system independence. Once a VR Juggler application is written for one system, it can run with VR Juggler on any other system.
The following are the major benefits of the of the virtual platform design in VR Juggler.
Architecture and OS independence
The JVP allows development of applications that are free from architecture and OS dependence leading to truly cross-platform applications. This allows applications written with the virtual platform to run on architecture that the JVP has been ported to. It also allows the virtual platform to be tuned for each local platform in order to run VR Juggler applications with high-performance.
Freedom from architecture and OS allow application development on any available hardware. It is possible to develop applications on low-end PC systems without sacrificing any functionality. The application will still run on high-end systems, but access to the high-end system and VR hardware is not required during development. Developing on low-end systems cuts costs and allows for easier application development.
Device abstraction
The JVP provides standard abstractions for many classes of VR devices such as: positional, digital, and glove. By using these common abstractions for device classes, the virtual software system hides the details of the actual devices in use. The application can make use of these device abstractions to get data from the devices.
The JVP eliminates the need for direct ties between the application and the hardware by separating the application and the device in use. Applications written using the virtual platform only need to use a device handle to an input device. A device handle has an associated device class and returns data of that class type. The input data can come from any available device that is of the needed class type or can simulate that class type.
Allows for use of multiple graphics APIs
In addition to freeing the application from hardware dependencies, a virtual platform must allow developers to use any graphics API they choose. This satisfies the requirements of not tying the environment to a single graphics API and also allowing the developer to use whatever tools are best suited for the job.
The JVP supports multiple graphics APIs by encapsulating all graphics API specific behavior in draw managers. Because the kernel represents only the part of the virtual platform that hides system details, we must add an additional interface to the virtual platform that is specific for each supported graphics API. Each draw manager controls the details of writing an application for its specific graphics API. The draw manager's interface represents an entirely different virtual platform interface that presents the application with an API-specific abstraction.
The kernel and the draw managers are used in parallel to create applications that are both independent of hardware and that make use of features of the graphics API used by the application. When we refer to the virtual platform in the rest of this writing, we will be referring to this combination of the kernel virtual platform interface and the draw manager virtual platform interface unless specifically noted.
Operating environment
The JVP provides a simple operating environment for VR applications. This operating environment allows for multiple running applications and components. Each running application is an object under the control of the JVP that shares resources and processing time with other applications currently executing.
The concept of a virtual platform facilitates and simplifies the effort of application development in complex VR systems. It provides a unified working environment that supports development and execution of applications, independently of the underlying technology. A virtual platform guarantees the longevity of applications, and allows application developers to keep up with the technology advances without having to invest time and resources in modifying applications to support the new technologies.
Although there is a popular, and all-to-often well-founded, belief that object-oriented abstraction introduces severe penalties in program performance, we believe that object-oriented design approach for VR Juggler as a virtual platform provides the best avenue to achieve its goals. We have placed a great deal of effort on optimization of our abstraction levels to minimize the performance impact. Currently, performance evaluations of the different components are under way; early results are showing that the overall VR Juggler performance is within acceptable response times.