Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 13, 2011, 9:35:47 PM (14 years ago)
Author:
landauf
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gamestates/GSLevel.cc

    r7876 r7879  
    111111    {
    112112        if (GameMode::showsGraphics())
    113         {
     113            InputManager::getInstance().leaveState("game");
     114
     115        // disconnect all HumanPlayers
     116        PlayerManager::getInstance().disconnectAllClients();
     117
     118        if (GameMode::isMaster())
     119            this->unloadLevel();
     120
     121        if (GameMode::showsGraphics())
     122        {
     123#if OGRE_VERSION < 0x010700
    114124            // unload all compositors (this is only necessary because we don't yet destroy all resources!)
    115125            Ogre::CompositorManager::getSingleton().removeAll();
    116 
    117             InputManager::getInstance().leaveState("game");
    118         }
    119 
    120         // disconnect all HumanPlayers
    121         PlayerManager::getInstance().disconnectAllClients();
    122 
    123         if (GameMode::isMaster())
    124             this->unloadLevel();
    125 
    126         if (GameMode::showsGraphics())
    127         {
     126#endif
     127
    128128            gameInputState_->setHandler(0);
    129129            guiMouseOnlyInputState_->setHandler(0);
Note: See TracChangeset for help on using the changeset viewer.