[Orxonox-commit 3186] r7879 - in code/trunk/src/orxonox: . gamestates

landauf at orxonox.net landauf at orxonox.net
Sun Feb 13 21:35:48 CET 2011


Author: landauf
Date: 2011-02-13 21:35:47 +0100 (Sun, 13 Feb 2011)
New Revision: 7879

Modified:
   code/trunk/src/orxonox/CameraManager.cc
   code/trunk/src/orxonox/gamestates/GSLevel.cc
Log:
moved compositor unloading to avoid crashes in rare cases
disabled compositor unloading for Ogre 1.7.0+ which fixes some issues with shaders

I'm unsure if this belongs into GSLevel anyway, since it's resource related and removeAll() requires quite some attention to be called in the right place.

Modified: code/trunk/src/orxonox/CameraManager.cc
===================================================================
--- code/trunk/src/orxonox/CameraManager.cc	2011-02-13 20:34:22 UTC (rev 7878)
+++ code/trunk/src/orxonox/CameraManager.cc	2011-02-13 20:35:47 UTC (rev 7879)
@@ -106,6 +106,7 @@
         //
         // Last known Ogre version needing this workaround:
         // 1.4.8
+        // 1.7.2
 
         // deactivate all compositors
         {

Modified: code/trunk/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.cc	2011-02-13 20:34:22 UTC (rev 7878)
+++ code/trunk/src/orxonox/gamestates/GSLevel.cc	2011-02-13 20:35:47 UTC (rev 7879)
@@ -110,12 +110,7 @@
     void GSLevel::deactivate()
     {
         if (GameMode::showsGraphics())
-        {
-            // unload all compositors (this is only necessary because we don't yet destroy all resources!)
-            Ogre::CompositorManager::getSingleton().removeAll();
-
             InputManager::getInstance().leaveState("game");
-        }
 
         // disconnect all HumanPlayers
         PlayerManager::getInstance().disconnectAllClients();
@@ -125,6 +120,11 @@
 
         if (GameMode::showsGraphics())
         {
+#if OGRE_VERSION < 0x010700
+            // unload all compositors (this is only necessary because we don't yet destroy all resources!)
+            Ogre::CompositorManager::getSingleton().removeAll();
+#endif
+
             gameInputState_->setHandler(0);
             guiMouseOnlyInputState_->setHandler(0);
             guiKeysOnlyInputState_->setHandler(0);




More information about the Orxonox-commit mailing list