[SDL] Slow blitting...

Neil Griffiths n.griffiths at virgin.net
Mon Sep 9 05:39:01 PDT 2002

Hello Jeff,

JW> //hasAlpha is set if the image contains any transparency/alpha blending
JW> stuff
JW> if (hasAlpha)
JW>         srf = SDL_DisplayFormatAlpha(temp);
JW> else
JW>         srf = SDL_DisplayFormat(temp);


Using a hardware surface and alpha blending isn't a good idea when the
alpha blending is done in software - it means you have to read from
video memory which is slow. If you double buffer and you're getting a
hardware surface, the buffer is also going to be in video memory.

If you're going to use alpha, use SDL_SWSURFACE.

I don't know if that's the cause of your slowdown though, you'll have
to give it a go!

Best regards,
 Neil                            mailto:n.griffiths at virgin.net

More information about the SDL mailing list