SDL, OpenGL, Alt-Tab?

Started by
0 comments, last by Waffler 18 years ago
I looked around for a while, but could not find a satisfactory answer on how to prevent your texture mapping from becomming garbled after pressing alt-tab when in full-screen mode. Can anybody please help me? I know I would likely need to reload the textures, but how can I (preferably through SDL) check if the application has lost, then regained focus? I know this should be simple, and is likely handled through the message queue, but clearifying a few details would be greatly appreciated. Thanks.
Advertisement
I made it so I can reload all of my textures, and I'm using SDL_ACTIVEEVENT to check when it regains focus, but now I'm having a strange problem.

When I go back into the game after pressing alt-tab, it's becomes almost frozen. I say almost frozen, because nothing is moving and the screen buffer is a little garbled, but pressing Escape still exits the program. The screen freezes.

Can anyone explain why this is happening and what can be done to fix it?

This topic is closed to new replies.

Advertisement