SDL_Flip() Vs SDL_UpdateRects()
Hi,
I thought that with SDL double-buffering was only available with a HW surface, which is only available full-screen (right?).
I'm using a SW (presumably single-buffered since I haven't requested double-buffering) screen surface, and SDL_UpdateRects() does not seem to work like I expected.
With SDL_UpdateRects() the areas requested are updated, but not drawn unless the window receives a VIDEOEXPOSE event... Spooky. However SDL_Flip(screen) (which should just act like SDL_UpdateRect(screen, 0, 0, 0, 0)) updates and draws everything ok. This however is a bit more expensive than i'd like.
The only thing I can think of is that SDL_Flip() creates and handles its own VIDEOEXPOSE event, while SDL_UpdateRects() doesn't.
So should I send a VIDEOEXPOSE event after calling SDL_UpdateRects(), or am I going wrong somewhere?
|