[SDL] Poor performance using alpha blending

thebigcheese thebigcheese at jobybednar.com
Mon Jan 27 09:56:01 PST 2003

I've only been playing with SDL since the weekend, so forgive me if this doesn't apply, but when playing around with randomly blitting a bitmap I had two extreme situations due to a single line of code.  Mainly, doing SDL_UpdateRect(pSurface,0,0,0,0) after each image blt.  I was doing a random transparency as well as a color key knocking out the background on a 24bit bmp.  The thing chugged.  Just getting into it, I was a little afraid at the performance and was thinking perhaps to just code in straight DirectX.  However, by updating only the rect that was newly blt (64x64), the speed was amazing... roughly 10,000 blts in 6 secs.  When setting the color key and transparency you can also try the SDL_RLEACCEL flag to help optimize and accelerate.

- Joby

---------- Original Message ----------------------------------
From: "Matt Monson" <madprog at hotmail.com>
Reply-To: sdl at libsdl.org
Date:  Mon, 27 Jan 2003 17:30:47 +0000

>yeah, i've found the same problems... really really slow (even at low 
>resolutions) in fullscreen....
>any workarounds or anything? shouldnt SDL_HWSURFACE work better than 
>Tired of spam? Get advanced junk mail protection with MSN 8. 
>SDL mailing list
>SDL at libsdl.org

More information about the SDL mailing list