The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
OpenGL alt-tabbing with full-screen in SDL 1.2
Ande


Joined: 16 Jul 2014
Posts: 4
Turbo Sliders (http://www.turbosliders.com/) is my old indie project which I still sometimes update for a new version after players bombard me long enough with new feature requests. It is still using SDL 1.2 and I would really much not like to upgrade to 2.0 yet as I really don't have the time for that right now.

One known nasty bug currently is that for players with certain video cards - especially Intel's integrated ones (Intel G41 Express, Intel Q45/Q43 Express, Intel HD Graphics 5500) - if the game is in OpenGL mode (the default) and players Alt+Tab out of the game and back, the game doesn't work anymore. In the logs, I can see that glGetError keeps returning GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 after every operation.

Any ideas on what I should do? Players can use DirectDraw driver which works but with the horribly slow alpha blending ruining the game. With DD, there is manual texture reloading if blits start returning -2 after alt-tabbing but I understood that wouldn't be necessary with OpenGL? Is there something else I am missing or is OpenGL with SDL 1.2 inherently flawed?

Any ideas for quick fixes? Or is SDL2 the only way?