[SDL] Are the Two interfaces SDL_UpdateRect(s) and SDL_Flip duplicated?

Pierre Phaneuf pphaneuf at gmail.com
Fri May 22 11:21:04 PDT 2009


On Fri, May 22, 2009 at 10:32 AM, 张增波 <zengbo.zhang at gmail.com> wrote:

> But you may say, when people draw something on 2 Rects, but right now he
> wants to update 1 Rect only , the SDL lib can't use Flip at all. I think
> this case is very strange for users, so we can ignore it. on the other hand,
> if users make a mistake, Create the surface with DOUBLEBUF option, but
> wrongly call UpdateRects instead of Flip, he will not get what he wants.

It all doesn't really matter, there's no interface to double-buffering
in SDL 1.3, and there's no SDL_Flip anymore (in the 1.3 API, there's
still one in the compatibility API that calls SDL_UpdateRect for the
whole screen). The new way, SDL_RenderPresent, is very simple, it has
no arguments at all, and yet can do the same optimizations you could
do with SDL_UpdateRect, automatically.

-- 
http://pphaneuf.livejournal.com/



More information about the SDL mailing list