0
votes

I've been using the latest SDL 1.3 with OpenGL to develop a game that is now in beta testing. Some users are reporting massive slowdowns when fullscreen -- about 18fps -- on something that can easily run 200-300fps in windowed mode. These same users are usually able to "fix" the problem by toggling between windowed and fullscreen modes once or twice. It then runs full-speed for them even fullscreen.

I'm unable to duplicate it on any of the systems I test on. And the three users who are experiencing the slowdown are on a range of different systems (all do happen to be Intel Dual Core 2 systems) running different graphics cards, so I doubt it's a driver issue.

What's encouraging is that the problem is demonstrated even in SDL's very minimal testgl2 demo that comes with SDL. If you simply modify the demo to run fullscreen, it'll demonstrate the same slowdown when fullscreen, as long as it's run on one of the "affected" systems. I'm curious if anyone here has MacOS X systems that duplicate the problem. To see, just download the latest SDL 1.3:

http://www.libsdl.org/tmp/SDL-1.3.zip

and build the SDL framework and then the SDL Test, compiling the gltest2 demo. Open up gltest2.c and put:

SDL_SetWindowFullscreen( state->windows[0], true );

right before /* Main render loop */

If you CAN duplicate the problem on your system [i.e. it runs under 60fps when fullscreen -- check your console output for the frame rate when you quit), please post here. Especially if you think you might have ideas for how to fix it! I've been trying to fix this for a couple of weeks now, and have scoured the internet to no avail.

1
What versions of OS X are affected? Have you tried a stable version of SDL, or tried to identify whether earlier snapshots of SDL 1.3 are affected?user57368
Yes, I've confirmed that an older snapshot of SDL (SDL-1.3.0-5080 from January 28th of this year) demonstrated the same issue.Vern Jensen
One user experiencing the issue is running OS X 10.6.8. I will check with the other two to see what they're running.Vern Jensen
Yep, they're running OS X 10.6.8. But several others running the same OS do not experience the issue.Vern Jensen

1 Answers

2
votes

This turned out to be a bug in SDL 1.3 (making the current fullscreen OpenGL context current again was slow, so now SDL caches the current context to make SDL_GL_MakeCurrent() a no-op). It's fixed now, between changesets 2a152e7e82f2 and 7ed38a8ad304.