[SDL] Regarding event programming

Bettina Rathmann B.Rathmann at ping.de
Sun Sep 29 17:07:01 PDT 2002


> Hi,
>     I am trying to playback a sequence of X screen dumps using SDL. The
> screen dumps are actually a recording of an X session. I have another
> program that does the same thing but uses X calls directly instead of using
> an abstraction like SDL. I found that SDL performs rather slow compared to
> using the raw API. I use the clock captured in the screen dumps as a basis
> for evaluation. 
>     I am using SDL_HWSURFACE in SDL_SetVideoMode. The depth is 24 bpp. Am i
> doing something wrong or is the slowness to be expected ? I realize that SDL
> relies on X after all. 

It sounds like you're getting some conversion going on in the background.
Make sure that you pass 0 for the depth in SDL_SetVideoMode() instead of
24, since the screen is really at 32 bpp, and if you ask SDL for 24 bpp,
you'll actually get conversion to and from the slowest pixel format out
there. :)

Remind me to use 32 bpp behind the scenes when asked for 24 bpp in SDL 2.0 :)

See ya!
	-Sam Lantinga, Software Engineer, Blizzard Entertainment




More information about the SDL mailing list