[SDL] SDL_Flip vs SDL_UpdateRect: what's better/smoother?

Edward Byard e_byard at yahoo.co.uk
Tue Jun 12 05:57:45 PDT 2007


>Why SDL_Flip is so slow? I know that it update all the screen, but it's
>an hardware process, or not? 

You answer your own question - it updates the whole screen which is always going to
be slower than just updating a part of it. Are you using hardware surfaces? It still has to
copy all the data to video memory....

>Am I doing something wrong?
>SDL_UpdateRect doesn't wait vertical sync, it isn't?

Nope. I don't see why you need to update the whole screen anyway...

>I also read that the sprite size should be "power of two", is it true?
>How much speed I gain doing so and why?

Doesn't need to be but not a bad idea to have power-of-two IMHO.
You will gain speed because calculations are quicker to perform on these surfaces.

Ed







      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070612/aef9c6a3/attachment.htm 


More information about the SDL mailing list