[SDL] SDL_UpdateRect

Neil Bradley nb at synthcom.com
Thu Jul 25 20:45:01 PDT 2002

Thanks for the reply, Darrell!

> > it operate or be used when I'm using an in-system memory backbuffer and
> > blitting deltas to a hardware surface?
> If the display surface is SDL_HWSURFACE, then you don't have to call
> SDL_UpdateRect(). You are drawing directly to (visible) video memory.

Ah - how about windowed hardware surfaces? Does that still apply?

> So, if you always call SDL_UpdateRects() you don't have to worry about
> the situation where you run a system that doesn't have hardware
> surfaces; your program will still work if the system you run on can't
> get a hardware surface. <soap box>This is what everyone should do,
> because it works on every supported platform, and gives the best chance
> for portability of your app. Realize that on most targets you can't even
> *get* a hardware surface to scribble on.</soap box>.

Okay - so to be fully compatible, I should be calling SDL_UpdateRects() on
the *TARGET* display surface - hardware or software surface, correct?
There is no need for SDL_UpdateRects() to be called on the source
(system memory) backbuffer, right?


Neil Bradley            What are burger lovers saying
Synthcom Systems, Inc.  about the new BK Back Porch Griller?
ICQ #29402898	        "It tastes like it came off the back porch." - Me

More information about the SDL mailing list