Changeset 11080 for code/trunk/src/orxonox/Scene.cc
- Timestamp:
- Jan 19, 2016, 11:27:40 PM (8 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/Scene.cc
r11071 r11080 27 27 * 28 28 */ 29 30 /** 31 @file Scene.cc 32 @brief Implementation of Scene Class 33 */ 34 29 35 30 36 #include "Scene.h" … … 51 57 #include "worldentities/WorldEntity.h" 52 58 #include "Level.h" 59 #include "RenderQueueListener.h" 53 60 54 61 namespace orxonox 55 62 { 56 63 RegisterClass(Scene); 57 64 65 /** 66 @brief 67 Constructor, it sets common standard paramters for a scene depending on whether it will be rendered or not. 68 It also makes sure we user our own render queue listener for rendering instead of the standard listener provided by Ogre 69 */ 58 70 SetConsoleCommand("Scene", "debugDrawPhysics", &Scene::consoleCommand_debugDrawPhysics).addShortcut().defaultValue(1, true).defaultValue(2, 0.5f); 59 71 … … 75 87 this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC); 76 88 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 89 this->renderQueueListener_ = new RenderQueueListener(); 90 this->sceneManager_->addRenderQueueListener(this->renderQueueListener_);//add our own renderQueueListener 77 91 78 92 this->radar_ = new Radar(); … … 84 98 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 85 99 100 this->renderQueueListener_ = nullptr; 86 101 this->radar_ = nullptr; 87 102 } … … 111 126 112 127 if (GameMode::showsGraphics()) 128 { 129 this->sceneManager_->removeRenderQueueListener(this->renderQueueListener_); 130 delete this->renderQueueListener_; 113 131 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_); 132 } 114 133 else 115 134 delete this->sceneManager_;
Note: See TracChangeset
for help on using the changeset viewer.