#include #include #include #include static void createScene(pfChannel *chan,int,char**); int main(int argc,char **argv) { pfInit(); /* General Performer & CAVE initialization */ pfCAVEConfig(&argc,argv,NULL); pfConfig(); /* Start all the Performer processes */ pfCAVEInitChannels(); /* Create all the windows */ if (CAVEConfig->Simulator) /* If in simulator mode, collect all timing statistics (displayed with 't' command) */ pfCAVEMasterChan()->getFStats()->setClass( PFSTATS_ALL^PFSTATSHW_ENGFXPIPE_FILL, PFSTATS_ON); else /* otherwise, disable all statistics (for performance) */ pfCAVEMasterChan()->getFStats()->setClass(PFSTATS_ALL, PFSTATS_OFF); createScene(pfCAVEMasterChan(),argc,argv); /* Create some sort of scene; the scene will be shared by all channels */ while (!CAVEgetbutton(CAVE_ESCKEY)) /* Main loop */ { pfSync(); /* Wait for the end of the current frame */ pfCAVEPreFrame(); /* Trigger the next frame */ pfFrame(); pfCAVEPostFrame(); } pfCAVEHalt(); /* Cleanup CAVE stuff */ pfExit(); /* Exit (pfExit() does not actually return) */ return 0; } static void createScene(pfChannel *chan,int,char**) { pfScene *scene = new pfScene; chan->setScene(scene); }