[SDL] background / palette tricks

Sam Crow samuraileumas at yahoo.com
Thu Nov 8 18:40:51 PST 2007


David Olofson <david <at> olofson.net> writes:
> As to palette animation, I wouldn't go there; not these days... 
> Indeed; it's easy to do with SDL (create an indexed 8 bpp surface and 
> mess with the palette), but it's rather expensive to render, as the 
> blitter has to convert pixel by pixel, looking colors up in the 
> palette, converting them to the display pixel format. A hardware 
> implementation could be extremely fast, but I don't know if any SDL 
> backends support this, or if that feature is actually accelerated on 
> your average video card. Either way, of the widely used backends it's 
> pretty much only DirectX that offers any h/w acceleration at all, so 
> you pretty much have to make things work without acceleration anyway.

Not only that but paletted graphics modes are deprecated in the latest versions
of OpenGL forcing programmers to replace those effects with equally-expensive
fragment shaders as well.



More information about the SDL mailing list