Thanks for the info.
Why not use HW surfaces for blending?
Because it’s usually very slow unless it’s accelerated. Reading from
VRAM is an insane number of times slower than reading from system
memory on most modern hardware.
Also note that to blend, you have to read the target surface av
well, so if you’re dealing with much more than a blended mouse
pointer, you’re better of doing all rendering in a software shadow
buffer and then blitting that to the display surface.
(To do this with proper page flipping where available, DO NOT ask SDL
for a software display surface. Instead, ask for a double buffered
hardware display surface, and then set up your own software shadow
If the hardware can support a blit with alpha then this would be
accelerated. If the blit does not support alpha then I see why you
would not want to use a HW surface with a blend. I suppose it
depends on the particular implementation on the backend correct?
Yes - and the only SDL 1.2 backend that supports it is the one for
DirectFB. (Accelerated “add-on” for Linux fbdev, that is.)
Other than that, you need the glSDL backend patch for SDL 1.2, the
glSDL application side wrapper (the original implementation), or you
need to use SDL 1.3. The last one has the advantage of supporting
Direct3D, whereas the glSDL variants need OpenGL to be of much use.
I will have to look to see if HW alpha is a capability you can
Not sure about SDL 1.2, but I’m pretty sure you can in SDL 1.3. IIRC,
it has an “accelerated” flag for every blit feature.
//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 --'On Saturday 17 November 2007, Brian Edmond wrote: