[SDL] SDL_Window suggestion
trick at icculus.org
Thu Apr 30 16:36:36 PDT 2009
Den Thu, 30 Apr 2009 16:55:04 +0200
skrev David Olofson <david at olofson.net>:
> 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.
Yeah, that is a problem.. You'd think people with such huge monitors
could afford graphics cards to drive them though =). Anyway, perhaps
hardware scaling could be detected, and native resolution with scaling
only used if hardware scaling is available? That might mean distorted
display on too old pcs, but it's still better than the game running too
slow to play when it'd otherwise work fine.
> 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.
Good idea =). Although, there are some LCD monitors and gfx drivers
that silently blur the image when scaling up even integer factors, so
image quality might not be the best with this. Also, native resolution
usually means no delay for mode-switching (some monitors can take
several seconds to switch). Still, it's an option..
More information about the SDL