App::App() { std::cout << "Creating Ogre application:" << std::endl; mRoot = NULL; mKeyboard = NULL; mMouse = NULL; mScene = NULL; mShutdown = false; mWindow = NULL; mSmallWindow = NULL; mRift = NULL; //Ogre engine setup (creates Ogre main rendering window) initOgre(); //Rift Setup (creates Oculus rendering window and Oculus inner scene - user shouldn't care about it) initRift(); //Input/Output setup (associate I/O to Oculus window) initOIS(); // Create Ogre main scene (setup and populate main scene) // This class implements App logic!! mScene = new Scene(mRoot, mMouse, mKeyboard); mScene->setIPD(mRift->getIPD()); //Viewport setup (link scene cameras to Ogre/Oculus windows) createViewports(); //Ogre::WindowEventUtilities::messagePump(); // START RENDERING! mRoot->startRendering(); }
App::App() { std::cout << "Creating Ogre application:" << std::endl; mRoot = NULL; mKeyboard = NULL; mMouse = NULL; mScene = NULL; mShutdown = false; mWindow = NULL; mSmallWindow = NULL; mRift = NULL; initOgre(); initOIS(); mScene = new Scene( mRoot, mMouse, mKeyboard, mRift); createViewports(); initRift(); Ogre::WindowEventUtilities::messagePump(); mRoot->startRendering(); }