[SDL] About gamma support in video driver

Loren Osborn linux_dr at yahoo.com
Wed Sep 25 11:45:01 PDT 2002


On Wed, 2002-09-25 at 11:28, DrEvil wrote:
> On Wed, 2002-09-25 at 10:59, Patrice Mandin wrote:
> > Hello,
> > 
> > I would like to know what kind of gamma support must be present in the
> > video drivers.
> 
> I don't believe SDL requires it to be implemented. Generally just a
> message stating it's not supported is sufficient.


Quite honestly, this seems like a double standard to me...  In SDL you
can query what video modes there are, and even what the best mode is,
but if you ask SDL for a mode that doesn't exist, it will emulate with a
speed penalty...

I think this is the very thing that makes SDL much more easy to use than
DirectX... in directX you always need ot handle non-existant features...
In SDL, it does it for you! :)

I think gamma should work the same way... If you ask SDL, it will tell
you if the current mode/vidcard/whatever supports gamma, but if you tell
it to do gamma correction, it should do so, despite a possible speed
penalty... (the speed penalty shouldn't be much more than an extra blit,
as all the gamma calculations should be able to be computed and stored
in a lookup table.)

Maybe one minor change to add for SDL 1.5/2.0?

Just my 2 cents,

-Loren






More information about the SDL mailing list