void Application::run(void) { /* Install callbacks with the tool manager: */ ToolManager* toolManager=getToolManager(); toolManager->getToolCreationCallbacks().add(this,&Application::toolCreationCallback); toolManager->getToolDestructionCallbacks().add(this,&Application::toolDestructionCallback); /* Install Vrui callbacks: */ setFrameFunction(frameWrapper,this); setDisplayFunction(displayWrapper,this); setSoundFunction(soundWrapper,this); /* Start the display: */ startDisplay(0,0); /* Start the sound renderer if requested: */ if(useSound) startSound(initSoundWrapper,this); /* Run the Vrui main loop: */ mainLoop(); /* Uninstall tool manager callbacks: */ toolManager->getToolCreationCallbacks().remove(this,&Application::toolCreationCallback); toolManager->getToolDestructionCallbacks().remove(this,&Application::toolDestructionCallback); }
void Application::run(void) { /* Install Vrui callbacks: */ setFrameFunction(frameWrapper,this); setDisplayFunction(displayWrapper,this); setSoundFunction(soundWrapper,this); /* Run the Vrui main loop: */ mainLoop(); }