System interaction

In order to better explain interaction within the VR Juggler architecture, we will now describe how the system starts up and loads a single OpenGL application (see Figure 15). In order to simplify the diagrams we will not go into the details of configuration, we also leave out some method invocations, and we do not deal with multiple application objects.

The first step in starting the system is to initialize the kernel. This starts by giving the kernel a thread of control. This is done in a startup routines that instantiates the kernel object, and then activates it by executing the kernel method start() which creates a thread for the kernel. Once the kernel has been activated, the kernel then initializes each internal manager.

The next step in startup is to create and initialize an application. First, an application object must be instantiated. Then the application object is given to the kernel to start executing. The first thing the kernel does with an application is to create the draw manager that the application needs. Once this is done, the kernel then executes the applications initialization methods and signals the draw manager to do the same.

The final phase of a clean startup is to start the execution frame loop. When the kernel does not have an application object, it does not execute any parts of the execution frame that deal with application objects.

The first step in the execution frame is to call the preFrame() method of the application to tell it that a frame is starting. Next the kernel triggers the draw manager to render. While the draw manager is rendering, the kernel calls the application intraFrame() method to allow for parallel processing of rendering and application processing. Next, the kernel synchronizes with the draw manager by invoking the blocking sync() method which will not return until rendering has been completed. The kernel then calls the application postSync() method to notify the application that the frame is done. Next, the kernel check for any reconfiguration requests. If there are requests, then the kernel reconfigures the virtual platform before continuing. The final step in the execution frame is to update all device data and compute the drawing projections for the next frame.

Figure 15. Kernel startup and execution