[SDL] Better performance needed - am I doing this right?
Sam Lantinga
slouken at devolution.com
Wed Jun 6 12:54:42 PDT 2007
> Eddy L O Jansson wrote:
> > Even so, I'd be chocked if this wasn't an update issue. Do you have just the one SDL_Flip in your code?
> I've got several SDL_Flip calls, one in each logical screen update section.
> I've done a bit more investigation and found that the time hog was the
> cursor undraw/draw routine. I've changed the SDL_Flip in that to an
> SDL_UpdateRect of the correct size and that has helped a lot.
Usually what people do is do all the drawing for a single frame and then
when they're all done and want to flush the changes so they are visible,
then they call SDL_Flip(). You definitely don't want to do it when you
are still busy drawing things like the cursor.
See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment
More information about the SDL
mailing list