Changeset 1824 for code/trunk/src/orxonox
- Timestamp:
- Sep 22, 2008, 9:45:37 PM (16 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r1820 r1824 137 137 void GSGraphics::leave() 138 138 { 139 using namespace Ogre; 140 139 141 delete this->guiManager_; 140 142 … … 145 147 delete this->inputManager_; 146 148 147 this->ogreRoot_->detachRenderTarget(this->renderWindow_); 148 delete this->renderWindow_; 149 //this->ogreRoot_->shutdown 150 // TODO: destroy render window 149 // destroy render window 150 this->renderWindow_->removeAllViewports(); 151 this->renderWindow_->removeAllListeners(); 152 RenderSystem* renderer = this->ogreRoot_->getRenderSystem(); 153 renderer->destroyRenderWindow("Orxonox"); 154 155 // Does the opposite of initialise() 156 ogreRoot_->shutdown(); 157 158 // Remove all resources and resource groups 159 StringVector groups = ResourceGroupManager::getSingleton().getResourceGroups(); 160 for (StringVector::iterator it = groups.begin(); it != groups.end(); ++it) 161 { 162 ResourceGroupManager::getSingleton().destroyResourceGroup(*it); 163 } 164 165 ParticleSystemManager::getSingleton().removeAllTemplates(); 166 167 // Shutdown the render system 168 this->ogreRoot_->setRenderSystem(0); 151 169 152 170 Settings::_getInstance().bShowsGraphics_ = false; … … 277 295 CCOUT(4) << "Creating render window" << std::endl; 278 296 279 this->renderWindow_ = ogreRoot_->initialise(true, "Orxonox V2");297 this->renderWindow_ = ogreRoot_->initialise(true, "Orxonox"); 280 298 281 299 Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, this); … … 291 309 CCOUT(4) << "Initialising resources" << std::endl; 292 310 //TODO: Do NOT load all the groups, why are we doing that? And do we really do that? initialise != load... 293 try294 {311 //try 312 //{ 295 313 Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); 296 314 /*Ogre::StringVector str = Ogre::ResourceGroupManager::getSingleton().getResourceGroups(); … … 299 317 Ogre::ResourceGroupManager::getSingleton().loadResourceGroup(str[i]); 300 318 }*/ 301 }302 catch (...)303 {304 CCOUT(2) << "Error: There was a serious error when initialising the resources." << std::endl;305 throw;306 }319 //} 320 //catch (...) 321 //{ 322 // CCOUT(2) << "Error: There was a serious error when initialising the resources." << std::endl; 323 // throw; 324 //} 307 325 } 308 326 -
code/trunk/src/orxonox/objects/Projectile.cc
r1822 r1824 54 54 this->smokeTemplateName_ = "Orxonox/smoke4"; 55 55 56 57 56 this->setStatic(false); 57 this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL); 58 58 59 59 if (this->owner_)
Note: See TracChangeset
for help on using the changeset viewer.