[SDL] Newbie question about blitting
Hendrik.Huettemann at t-online.de
Sat Jul 26 04:37:02 PDT 2003
i'm new to SDL and spent a weekend so far figuring out how everything
is working. I've started with some speed-tests today and ran across
some strange behaviors (ok, i didn't went through the complete SDK
sources, maybe it's already explained there :-) )
Each frame I do a simple fullscreen blit from a backbuffer to the
double-buffered main-surface, calculate the frame rate, draw a short
string (~20 blits, no Alpha or ColorKey), doing a flip.
In fullscreen, everything is working fine, framerate is up to 85fps
and profiler shows a cpu-load which is equivalent to DirectX.
When testing in windowed-mode, framerate drops to 14-18fps?? Profiler
shows that all cpu-time is used by the SDL_Flip function.
All surfaces are converted to displayFormat, so there shouldn't be any
trouble blitting the data.
I did the same test on different computers, different
resolutions, different OS's, with the same result.
I've also thrown away the doublebuffer/flip structure and used
singlebuffer with SDL_UpdateRect().
So my question is...what is SDL doing when flipping in windowed mode?
Or did i miss something and this is normal for SDL?
Thanks in advance :-)
More information about the SDL