[Orxonox-commit 6484] r11131 - in code/branches/ogre1.9/src: libraries/util orxonox

landauf at orxonox.net landauf at orxonox.net
Sun Mar 6 16:43:02 CET 2016


Author: landauf
Date: 2016-03-06 16:43:02 +0100 (Sun, 06 Mar 2016)
New Revision: 11131

Modified:
   code/branches/ogre1.9/src/libraries/util/OgreForwardRefs.h
   code/branches/ogre1.9/src/orxonox/Scene.cc
   code/branches/ogre1.9/src/orxonox/Scene.h
Log:
initialize overlay component

Modified: code/branches/ogre1.9/src/libraries/util/OgreForwardRefs.h
===================================================================
--- code/branches/ogre1.9/src/libraries/util/OgreForwardRefs.h	2016-03-06 15:13:15 UTC (rev 11130)
+++ code/branches/ogre1.9/src/libraries/util/OgreForwardRefs.h	2016-03-06 15:43:02 UTC (rev 11131)
@@ -114,6 +114,7 @@
     class OverlayElement;
     class OverlayElementFactory;
     class OverlayManager;
+    class OverlaySystem;
     class Particle;
     class ParticleAffector;
     class ParticleAffectorFactory;

Modified: code/branches/ogre1.9/src/orxonox/Scene.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/Scene.cc	2016-03-06 15:13:15 UTC (rev 11130)
+++ code/branches/ogre1.9/src/orxonox/Scene.cc	2016-03-06 15:43:02 UTC (rev 11131)
@@ -39,6 +39,9 @@
 #include <OgreSceneManager.h>
 #include <OgreSceneManagerEnumerator.h>
 #include <OgreSceneNode.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlaySystem.h>
+#endif
 
 #include <BulletCollision/BroadphaseCollision/btAxisSweep3.h>
 #include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
@@ -89,6 +92,10 @@
             this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
             this->renderQueueListener_ = new RenderQueueListener();
             this->sceneManager_->addRenderQueueListener(this->renderQueueListener_);//add our own renderQueueListener
+#if OGRE_VERSION >= 0x010900
+            this->overlaySystem_ = new Ogre::OverlaySystem();
+            this->sceneManager_->addRenderQueueListener(this->overlaySystem_);
+#endif
 
             this->radar_ = new Radar();
             this->glowShader_ = new GlobalShader(this);
@@ -133,6 +140,10 @@
 
             if (GameMode::showsGraphics())
             {
+#if OGRE_VERSION >= 0x010900
+                this->sceneManager_->removeRenderQueueListener(this->overlaySystem_);
+                delete this->overlaySystem_;
+#endif
                 this->sceneManager_->removeRenderQueueListener(this->renderQueueListener_);
                 delete this->renderQueueListener_;
                 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);

Modified: code/branches/ogre1.9/src/orxonox/Scene.h
===================================================================
--- code/branches/ogre1.9/src/orxonox/Scene.h	2016-03-06 15:13:15 UTC (rev 11130)
+++ code/branches/ogre1.9/src/orxonox/Scene.h	2016-03-06 15:43:02 UTC (rev 11131)
@@ -110,6 +110,7 @@
             Ogre::SceneManager*      sceneManager_; //!< This is a pointer to the Ogre SceneManager we're using to render the Scene
             Ogre::SceneNode*         rootSceneNode_; //!< This is a pointer to the root node of the Scene tree
             RenderQueueListener*     renderQueueListener_; //!< this is a pointer to the RenderQueueListener we're using for this Scene
+            Ogre::OverlaySystem*     overlaySystem_;
 
             std::string              skybox_; //!< This string holds information about the skybox we're using
             ColourValue              ambientLight_; //!< This variable holds the color value for the ambient light in our scene, usually black in space




More information about the Orxonox-commit mailing list