[Orxonox-commit 5865] r10525 - code/branches/core7/src/libraries/core

landauf at orxonox.net landauf at orxonox.net
Thu Jun 4 23:09:40 CEST 2015


Author: landauf
Date: 2015-06-04 23:09:40 +0200 (Thu, 04 Jun 2015)
New Revision: 10525

Modified:
   code/branches/core7/src/libraries/core/Core.cc
   code/branches/core7/src/libraries/core/GraphicsManager.cc
   code/branches/core7/src/libraries/core/GraphicsManager.h
Log:
unload debug overly while unloading graphics

Modified: code/branches/core7/src/libraries/core/Core.cc
===================================================================
--- code/branches/core7/src/libraries/core/Core.cc	2015-06-04 20:32:52 UTC (rev 10524)
+++ code/branches/core7/src/libraries/core/Core.cc	2015-06-04 21:09:40 UTC (rev 10525)
@@ -360,6 +360,9 @@
     {
         orxout(internal_info) << "unloading graphics in Core" << endl;
 
+        if (this->graphicsManager_)
+            this->graphicsManager_->unloadDebugOverlay();
+
         safeObjectDelete(&graphicsScope_);
         safeObjectDelete(&guiManager_);
         safeObjectDelete(&inputManager_);

Modified: code/branches/core7/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/core7/src/libraries/core/GraphicsManager.cc	2015-06-04 20:32:52 UTC (rev 10524)
+++ code/branches/core7/src/libraries/core/GraphicsManager.cc	2015-06-04 21:09:40 UTC (rev 10525)
@@ -140,8 +140,6 @@
     {
         orxout(internal_status) << "destroying GraphicsManager..." << endl;
 
-        Loader::getInstance().unload(debugOverlay_.get());
-
         Ogre::WindowEventUtilities::removeWindowEventListener(renderWindow_, ogreWindowEventListener_);
         ModifyConsoleCommand(__CC_printScreen_name).resetFunction();
         ModifyConsoleCommand(__CC_GraphicsManager_group, __CC_setScreenResolution_name).resetFunction();
@@ -333,6 +331,11 @@
         Loader::getInstance().load(debugOverlay_.get(), ClassTreeMask(), false);
     }
 
+    void GraphicsManager::unloadDebugOverlay()
+    {
+        Loader::getInstance().unload(debugOverlay_.get());
+    }
+
     /**
     @note
         A note about the Ogre::FrameListener: Even though we don't use them,

Modified: code/branches/core7/src/libraries/core/GraphicsManager.h
===================================================================
--- code/branches/core7/src/libraries/core/GraphicsManager.h	2015-06-04 20:32:52 UTC (rev 10524)
+++ code/branches/core7/src/libraries/core/GraphicsManager.h	2015-06-04 21:09:40 UTC (rev 10525)
@@ -94,6 +94,7 @@
 
         void upgradeToGraphics();
         void loadDebugOverlay();
+        void unloadDebugOverlay();
         bool rendererLoaded() const { return renderWindow_ != NULL; }
 
         void setCamera(Ogre::Camera* camera);




More information about the Orxonox-commit mailing list