[SDL] SDL_Window suggestion

David Olofson david at olofson.net
Thu Apr 30 07:55:04 PDT 2009

On Thursday 30 April 2009, Gerry JJ wrote:
[...aspect ratio, scaling etc...]
> The solution (or rather, work-around) to all these problems is to
> use native resolution and do the scaling yourself, like I said. 
> This isn't uncommon practice in recent 2D games, and it'd be nice if
> SDL supported it directly.

Be warned though; large display can be *very* expensive to drive in 
their native resolutions! (A 30" is normally 2560x1600, for example. 
That is, 4 Mpixel, or 16 MB/frame in 32 bpp mode.)

With a serious video card (or two...) and hardware scaling, it works 
fine, but budget video cards or software scaling just doesn't cut it.

I would suggest scaling to the lowest supported resolution that has 
the same aspect ratio as the native resolution, or possibly the 
lowest supported resolution that is an integer factor lower than the 
native resolution. Unless you're using interpolated/filtered scaling, 
this doesn't even affect the visual appearance, but obviously, it 
saves loads of bandwidth.

//David Olofson - Programmer, Composer, Open Source Advocate

.-------  http://olofson.net - Games, SDL examples  -------.
|        http://zeespace.net - 2.5D rendering engine       |
|       http://audiality.org - Music/audio engine          |
|     http://eel.olofson.net - Real time scripting         |
'--  http://www.reologica.se - Rheology instrumentation  --'

More information about the SDL mailing list