HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Game not drawing while not focused

View previous topic View next topic Go down 
AuthorMessage
RedEye
Retired
avatar

Game username : -redeye-
Server : KITO
Male Posts : 2575
Join date : 2011-07-24
Age : 30

PostSubject: Game not drawing while not focused   Thu Feb 02, 2012 10:30 pm

A little annoyance for many window players.

Fixed with:
Code:
mWindow->setDeactivateOnFocusChange(false);

Placed after mWindow being set in:
Code:
   void go()
   {
      String pluginsPath;
      // only use plugins.cfg if not static
#ifndef OGRE_STATIC_LIB
      pluginsPath = mResourcePath + "plugins.cfg";
#endif
      
        mRoot = new Root(pluginsPath,
            mResourcePath + "ogre.cfg", mResourcePath + "Ogre.log");

        setupResources();
      
      if(mRoot->showConfigDialog())
      {
         mWindow = mRoot->initialise(true, "Magix");
         mWindow->setDeactivateOnFocusChange(false);
         mSceneMgr = mRoot->createSceneManager(ST_EXTERIOR_CLOSE);
         createCamera();

         ResourceGroupManager::getSingleton().addResourceLocation("./media/trees", "FileSystem");
         ResourceGroupManager::getSingleton().addResourceLocation("./media/terrains", "FileSystem");
         ResourceGroupManager::getSingleton().addResourceLocation("./media/grass", "FileSystem");
         ResourceGroupManager::getSingleton().initialiseAllResourceGroups();

         initializeOIS();

         load();
         run();
      }

      unload();
   }
Back to top Go down
 
Game not drawing while not focused
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: START HERE :: KITO's IT Source Code :: Bugs & Patches-
Jump to: