Advertisement
Guest User

Untitled

a guest
Apr 29th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1.     // Load the OpenGL RenderSystem and the Octree SceneManager plugins
  2.     for (auto j : plugins_toLoad) {
  3.         //#ifdef _DEBUG
  4.             mRoot->loadPlugin(j + Ogre::String("_d"));
  5.         //#else
  6.             mRoot->loadPlugin(j);
  7.         //#endif
  8.     }
  9.     // Check if the required plugins are installed and ready for use
  10.     for (auto required_plugin : required_plugins) {
  11.         bool found = false;
  12.         for (auto installed_plugin_ptr : mRoot->getInstalledPlugins()) {
  13.             if (required_plugin == installed_plugin_ptr->getName())  {
  14.                 found = true;
  15.                 break;
  16.             }
  17.         }
  18.         if (!found) {
  19.             throw std::runtime_error(Ogre::String("The required plugin ") + required_plugin + " could not be found");
  20.         }
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement