But in fullscreen mode, I get varied and unreliable results, and it never works completely properly.
Most typical situation is that I get a large black region on the desktop the same size as my game screen. It's always on top, the mouse, desktop and other programs are obscured by it.
Any ideas on how I can fix this?
My mainloop message pump code looks like this:
Code: Select all
while(!m_bShutdown && !OgreFramework::getSingletonPtr()->isOgreToBeShutDown())
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
Ogre::WindowEventUtilities::messagePump() ;
#endif
// update ogre
if(OgreFramework::getSingletonPtr()->m_pRenderWnd->isActive())
{
if(bActive==false)
{
while(ShowCursor(false)>0); // if coming back to the program, sometimes have the desktop cursor, get rid of it.
OgreFramework::getSingletonPtr()->m_pRoot->clearEventTimes() ;
bActive=true ;
}
OgreFramework::getSingletonPtr()->updateOgreB(); // update graphics, sound and physics
if(OgreFramework::getSingletonPtr()->m_pRenderWnd->isClosed()) m_bShutdown = true;
}
else
{
bActive=false ;
Sleep(10);
}
}