bool Main::Run() { ResetConfig(); GetConfig(); #if _DEBUG mRoot = new Ogre::Root("","","ogre.graphics.log"); #else mRoot = new Ogre::Root("","","ogre.graphics.log"); #endif setupRenderSystem(); Log::Instance().LogMessage("Main Run"); mWindow = mRoot->initialise(true, "Blackstar Engine"); size_t window_hwnd; mWindow->getCustomAttribute("WINDOW", &window_hwnd); createInputSystem(window_hwnd); initScene(); CreateMainLoopThreads(); return true; }
//Application initialisation void Application::initialise() { createRoot(); defineResources(); setupRenderSystem(); createRenderWindow(); initialiseResourceGroups(); setupScene(); setupInputSystem(); }
void Main::ExternInit() { mRoot = new Ogre::Root("","","ogre.graphics.log"); ResetConfig(); GetConfig(); setupRenderSystem(); mRoot->initialise(false); }
RenderSystem::RenderSystem() { OgreLogging::configureLogging(); std::string rviz_path = ros::package::getPath(ROS_PACKAGE_NAME); setupDummyWindowId(); ogre_root_ = new Ogre::Root( rviz_path+"/ogre_media/plugins.cfg" ); loadOgrePlugins(); setupRenderSystem(); ogre_root_->initialise(false); setupResources(); makeRenderWindow( dummy_window_id_, 1, 1 ); Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); }
RenderSystem::RenderSystem() : ogre_overlay_system_(NULL) , stereo_supported_(false) { OgreLogging::configureLogging(); std::string rviz_path = ros::package::getPath(ROS_PACKAGE_NAME); setupDummyWindowId(); ogre_root_ = new Ogre::Root( rviz_path+"/ogre_media/plugins.cfg" ); #if ((OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR >= 9) || OGRE_VERSION_MAJOR >= 2 ) ogre_overlay_system_ = new Ogre::OverlaySystem(); #endif loadOgrePlugins(); setupRenderSystem(); ogre_root_->initialise(false); makeRenderWindow( dummy_window_id_, 1, 1 ); detectGlVersion(); setupResources(); Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); }