[SDL] Slow blitting...
n.griffiths at virgin.net
Mon Sep 9 05:39:01 PDT 2002
JW> //hasAlpha is set if the image contains any transparency/alpha blending
JW> if (hasAlpha)
JW> srf = SDL_DisplayFormatAlpha(temp);
JW> srf = SDL_DisplayFormat(temp);
JW> SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN
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!
Neil mailto:n.griffiths at virgin.net
More information about the SDL