How to deal with OpenGL and Fullscreen on OS X
Posted
by
Armin Ronacher
on Game Development
See other posts from Game Development
or by Armin Ronacher
Published on 2011-03-05T02:27:12Z
Indexed on
2011/03/05
7:32 UTC
Read the original article
Hit count: 511
I do most of my development on OS X and for my current game project this is my target environment. However when I play games I play on Windows. As a windows gamer I am used to Alt+Tab switching from within the game to the last application that was open.
On OS X I currently can't find either a game that supports that nor can I find a way to make it possible. My current project is based on SDL 1.3 and I can see that cmd+tab is a sequence that is sent directly to my application and not intercepted by the operating system.
Now my first attempt was to hide the rendering window on cmd+tab which certainly works, but has the disadvantage that a hidden OpenGL window in SDL cannot be restored when the user tabs back to the application. First of all, there is no event fired for that or I can't find it, secondly the core problem is that when that application window is hidden, my game is still the active application, just that the window disappeared.
That is incredible annoying.
Any ideas how to approximate the windows / linux behavior for alt+tab?
© Game Development or respective owner