Cegui windows disappear temporarily.

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Montred
Not too shy to talk
Not too shy to talk
Posts: 42
Joined: Sat Nov 10, 2012 06:45

Cegui windows disappear temporarily.

Postby Montred » Sat Nov 10, 2012 08:00

There's a weird bug related (I think) to the DirectX context in the Ogre renderer.

When I'm using CEGUI with Ogre3D in Direct3D9 mode in Windows 7 with ATI drivers, if I alt tab from my game to other DirectX game and then go back to my game, all the CEGUI windows disappear temporarily. Now, as I hover over the buttons, the buttons start to turn visible. Making a window invisible and then visible again fixes the problem. I don't attach the log because there are no messages when this happens.

So currently I have this workaround, every time the application gets focus I "reset" the gui by making every window that is supposed to be visible invisible and then visible again:

Code: Select all

      CEGUI::WindowManager::WindowIterator it = m_windowManager->getIterator();
      it.toStart();
      while (!it.isAtEnd()){
        if ((*it)->isVisible()){
         (*it)->hide();
         (*it)->show();
        }
        it++;
      }


This is a hack though, so I thought I'd ask in case somebody knows what could be causing the problem.

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: Cegui windows disappear temporarily.

Postby mmixLinus » Fri Nov 23, 2012 13:10

Hi,

Tried this? (These messages are received for if you're using DirectX)

Code: Select all

void OgreApplication::eventOccurred(const Ogre::String& eventName, const Ogre::NameValuePairList * /*parameters*/)
{
   if (eventName == "DeviceLost")
   {
      setDeviceLost(true);  // just some MMiX.Me handling
   }
   else if (eventName == "DeviceRestored")
   {
      setDeviceLost(false);  // just some MMiX.Me handling
      CEGUI::System::getSingleton().signalRedraw();         // <-----
   }
}

/mmixLinus
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)

Montred
Not too shy to talk
Not too shy to talk
Posts: 42
Joined: Sat Nov 10, 2012 06:45

Re: Cegui windows disappear temporarily.

Postby Montred » Mon Dec 03, 2012 09:24

The signal redraw doesn't work. Thanks for the tip though, maybe I can combine the two solutions for something more stable than what I have.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 30 guests