[SDL] hardware alpha & colorkey support

sapsan sapsan at rv.uar.net
Sun Jan 23 03:29:16 PST 2005


Michael B. Edwin Rickert wrote:

> sapsan wrote:
>> There are some really annoying questions(as for game development 
>> process):
>> 1)" Does current SDL version has hardware alpha blitting(i mean about 
>> hardware per pixel alpha support)?";
>> 2)"What about a modern hardware graphics without support of hardware 
>> colorkey?".
> Where supported.
> Since SDL uses DirectX for rendering on windows, I'm guessing it gets 
> some speed advantages from that. This is assuming you're working with 
> hardware surfaces of course...
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
sorry for my English

videoinfo tell me, what I have not accelerated blits with alpha
blit_hw_A = 0  

without alpha (SDL_DisplayFormatAlpha) all has high speed and nontearing 
(with waiting retrace)
(I am was readed article 
http://www.linuxdevcenter.com/pub/a/linux/2003/08/07/sdl_anim.html about 
hardware surfaces very carefully)

I am under Windows XP Pro + DirectX 9c + ATI Radeon 9600 Pro

and it is look like some question from SDL FAQ:
Q:    I'm using hardware surfaces, and performance is very bad!   
A:    Try using software surfaces. It's counter-intuitive, but if you're 
directly accessing the pixels on a surface or the screen, it's actually 
faster to do all your work in system memory and then send the final 
result to the screen than it is to push individual pixels over the 
system bus to the video card. *This is especially important when doing 
alpha blending because very few drivers expose 2D alpha blending in 
hardware. This means that the alpha blending is performing a read 
operation on the destination surface, and reading from video memory is 
especially slow on modern graphics hardware.*
If this is a serious problem for you, and you know your target audience 
has 3D hardware, you might consider using SDL with OpenGL for 3D 

More information about the SDL mailing list