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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Aug 27 2015 15:02:27