Changeset 2468
- Timestamp:
- Dec 15, 2008, 7:40:25 PM (16 years ago)
- Location:
- code/branches/presentation/src/orxonox/objects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/Scene.cc
r2466 r2468 74 74 { 75 75 // create a dummy SceneManager of our own since we don't have Ogre::Root. 76 this->sceneManager_ = new Ogre::DefaultSceneManager(""); 77 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 76 this->sceneManagerDedicated_ = new Ogre::DefaultSceneManager(""); 77 this->rootSceneNode_ = this->sceneManagerDedicated_->getRootSceneNode(); 78 this->sceneManager_ = 0; 78 79 } 79 80 … … 114 115 else if (!Core::showsGraphics()) 115 116 { 116 delete this->sceneManager _;117 delete this->sceneManagerDedicated_; 117 118 } 118 119 -
code/branches/presentation/src/orxonox/objects/Scene.h
r2466 r2468 78 78 79 79 Ogre::SceneManager* sceneManager_; 80 Ogre::SceneManager* sceneManagerDedicated_; 80 81 Ogre::SceneNode* rootSceneNode_; 81 82 -
code/branches/presentation/src/orxonox/objects/worldentities/Model.cc
r2459 r2468 68 68 void Model::changedMesh() 69 69 { 70 if (this->mesh_.getEntity()) 71 this->detachOgreObject(this->mesh_.getEntity()); 70 if (Core::showsGraphics()) 71 { 72 if (this->mesh_.getEntity()) 73 this->detachOgreObject(this->mesh_.getEntity()); 72 74 73 this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);75 this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_); 74 76 75 if (this->mesh_.getEntity()) 76 { 77 this->attachOgreObject(this->mesh_.getEntity()); 78 this->mesh_.getEntity()->setCastShadows(this->bCastShadows_); 79 this->mesh_.setVisible(this->isVisible()); 77 if (this->mesh_.getEntity()) 78 { 79 this->attachOgreObject(this->mesh_.getEntity()); 80 this->mesh_.getEntity()->setCastShadows(this->bCastShadows_); 81 this->mesh_.setVisible(this->isVisible()); 82 } 80 83 } 81 84 } -
code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.cc
r2459 r2468 51 51 RegisterObject(ParticleEmitter); 52 52 53 if ( !this->getScene() || !this->getScene()->getSceneManager())53 if (Core::showsGraphics() && (!this->getScene() || !this->getScene()->getSceneManager())) 54 54 ThrowException(AbortLoading, "Can't create Camera, no scene or no scene manager given."); 55 55
Note: See TracChangeset
for help on using the changeset viewer.