SDL Performance on Windows

Hi,

I’m using SDL for Windows and Linux games. I see it is running considerably
slower in Windows. I don’t know, is there a good reason for that? I heard
that Windows purposely makes some process slower, like OpenGL and SDL. Is
that true?

Thanks in advance!–
Yuri David Santos
Aleva Games
games.aleva.com.br http://www.aleva.com.br

I think windows sets opengl on a lower priority if it isn’t full screen. If
that isn’t the issue, than it may be an issue with your video drivers.
If neither of those help, you may have to give the mailing list a bit of
context of what you’re doing that is faster in linux and slower in windows.

Take care,
-AlexOn Mon, Oct 24, 2011 at 1:24 PM, Yuri David Santos wrote:

Hi,

I’m using SDL for Windows and Linux games. I see it is running considerably
slower in Windows. I don’t know, is there a good reason for that? I heard
that Windows purposely makes some process slower, like OpenGL and SDL. Is
that true?

Thanks in advance!


Yuri David Santos
Aleva Games
games.aleva.com.br http://www.aleva.com.br


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

“Sort of” and “no.”

Microsoft has a long history of trying to sabotage widespread OpenGL adaption,
to push developers towards Direct3D. This has been done by including only
Direct3D drivers by default, pushing system builders to strip OpenGL from the
pre-installed drivers, and various other nasty tricks that have caused
problems for developers and their less tech savvy users.

(Hardcore gamers are generally not a problem in this regard, as they tend to
download proper drivers directly from the respective vendors anyway.)

As to the SDL (as in, software rendering) part, this is a problem with the way
modern PC hardware is designed. Any normal PC (most integrated graphics
solutions included, strangely enough) have a crippling bottleneck between the
main CPU and VRAM. Writing speeds tend to be just barely sufficient for
fullscreen animation at (by modern standards) low resolutions, whereas reading
may well be slower than reading from a hard drive. You’ll have the same
problems with Linux, *BSD, BeOS or whatever, as there is little an operating
system or any other software can do about it.

Basically, you should be using (or at least optionally supporting) OpenGL
and/or Direct3D rendering whenever performance is critical.On Monday 24 October 2011, at 19.24.20, Yuri David Santos wrote:

Hi,

I’m using SDL for Windows and Linux games. I see it is running considerably
slower in Windows. I don’t know, is there a good reason for that? I heard
that Windows purposely makes some process slower, like OpenGL and SDL. Is
that true?


//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://consulting.olofson.net http://olofsonarcade.com |
’---------------------------------------------------------------------’

Uh, yes, that too; Windows has some sort of problems with OpenGL in windowed
mode, whereas on Linux it tends to have little or no impact. Haven’t
investigated why this happens, though.

My solution for now: Use fullscreen mode… :-DOn Monday 24 October 2011, at 19.41.45, Alex Barry <alex.barry at gmail.com> wrote:

I think windows sets opengl on a lower priority if it isn’t full screen.
If that isn’t the issue, than it may be an issue with your video drivers.
If neither of those help, you may have to give the mailing list a bit of
context of what you’re doing that is faster in linux and slower in
windows.


//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://consulting.olofson.net http://olofsonarcade.com |
’---------------------------------------------------------------------’

I’m using SDL for Windows and Linux games. I see it is running
considerably slower in Windows. I don’t know, is there a good reason for
that? I heard that Windows purposely makes some process slower, like
OpenGL and SDL. Is that true?

I don’t think that’s true in any meaningful sense…but the default
OpenGL drivers on Windows tend to be not good. Installing (for example)
Nvidia’s drivers should work fine, though.

What sort of slowdown are you seeing? If you’re getting hundreds or
thousands of frames per second on Linux, but it’s constantly hovering
around 60 on Windows, then you have vsync turned on.

Other than that: we’re going to need more information.

–ryan.