[SDL] slooow

Mattias Engdegård f91-men at nada.kth.se
Thu Apr 6 09:12:06 PDT 2000


>I've made a small program that blits a 720x576 (24 bpp) image into a 800x600
>SDL window. The problem is that its painfully slow. It takes over 200 ms to
>blit one image. Much much slower than doing it with gdk_draw_rgb_image (~110
>ms) from gtk+.

I doubt you will get it fast enough with MIT-SHM, if that is what you are
trying to do. Try x11perf -shmput500 to get a feeling for what is possible.
Make sure you are not trying to blit a 24bpp image onto a 32bpp
surface; that conversion will take some time. I don't think XFree 3.x
supports 24bpp visuals (depth 24 will give you 32bpp).

Remember that you are shoving 1.6 megs from memory, through the CPU and to
the frame buffer each time. If 16bpp is possible, blits will be around
twice as fast.

-- Mattias




More information about the SDL mailing list