initialization.cpp
Go to the documentation of this file.
00001 #include "initialization.h"
00002 
00003 #include <OGRE/OgreRoot.h>
00004 #include <OGRE/OgreRenderSystem.h>
00005 #include <OGRE/OgreLogManager.h>
00006 
00007 #include <exception>
00008 #include <stdexcept>
00009 
00010 #include <ros/package.h>
00011 
00012 namespace ogre_tools
00013 {
00014 
00015 void cleanupOgre()
00016 {
00017   delete Ogre::Root::getSingletonPtr();
00018 }
00019 
00020 // This should be folded into RenderSystem, but it should work fine as
00021 // is, so I'm leaving it for now.
00022 void initializeResources( const V_string& resource_paths )
00023 {
00024   V_string::const_iterator path_it = resource_paths.begin();
00025   V_string::const_iterator path_end = resource_paths.end();
00026   for( ; path_it != path_end; ++path_it )
00027   {
00028     Ogre::ResourceGroupManager::getSingleton().addResourceLocation( *path_it, "FileSystem", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME );
00029   }
00030 
00031   Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
00032 }
00033 
00034 } // namespace ogre_tools


ogre_tools_qt
Author(s): Josh Faust
autogenerated on Fri Dec 6 2013 20:56:42