[SDL] Fast alpha blitting

David Olofson david at olofson.net
Fri Sep 16 16:25:36 PDT 2005

On Friday 16 September 2005 19.40, David Olsen wrote:
> If you're trying to get smooth 
> edges on some sprites, for instance, you'll need to stick with the
> slower per-pixel,

Well, yes - but antialiazed sprites are generally mostly (as in 90% or 
so) fully transparent and fully opaque pixels. If you enable the RLE 
acceleration, the cost of alpha blending only impacts the pixels that 
actually need blending.

> or try out glSDL backend, which I haven't tried so I can't tell you
> anymore than that.

glSDL is handy if you want to *optionally* support high resolutions 
and/or additional blending effects, or just want to give demanding 
users insane frame rates - but if software rendering just doesn't cut 
it regardless of settings, glSDL isn't really a solution. If you 
depend on OpenGL through glSDL for playable frame rates, you're 
probably better off using OpenGL directly.

(One might argue that there might be systems where there are 
accelerated SDL backends, but no accelerated OpenGL. However, most of 
the time it seems to be the other way around; if anything at all is 
accelerated, it's OpenGL... That's why glSDL came to be in the first 

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

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---

More information about the SDL mailing list