[SDL] Blitting speeds

Prasanth Kumar kumar1 at home.com
Wed Aug 25 21:49:58 PDT 1999

> Can somebody please take a look at these blit functions and tell me why
they are so slow. I use them in my PowerPak lib, and a tile based display of
a 64x64 image at 640x480 is only going at 13fps on a 400mhz AMD K6-2. There
have been a few people complain my lib is slow, but how can I possibly speed
this up? I know SDL isn't slow because CivCTP is not slow at all, neither
are other peoples programs.  Should I not use SDL's blit function?
> When I use BlitTransparent it slows down to like 4 or 5 fps (2 or 3 if I
turn on an alpha value) This doesn't make sense to me. SDL is way fast, and
this is just basically a wrapper to SDL.  Should I initial SDL/the graphics
mode/the surface with a certain flag to speed it up?
> Lots of linux news sites are picking up PowerPak and I have been getting
hundreds of visitors a week (granted must of the are probably returns) but I
would really like to have something a little faster to show them.  Karl
Bartel pointed out alot of things I was doing that didn't need to be done
because SDL does them, but aside from making the user fill in the SDL_Rects
themselves I don't think I can do much more. Writing my own blit routine
doesn't really make much sense as I am sure Sam has already written a better
one than I could anyway.
> Thanks for listening to my rambling ignorance and offering any help you
can :)
I'm kind of new to SDL but did you do a 'DisplayFormat' operation before you
do blitting? If the pixel format differs between the two surfaces, SDL will
do a conversion while it is blitting.

BTW, where can I find information about PowerPak?

Prasanth Kumar
kumar1 at home.com

More information about the SDL mailing list