Can you only update specific portions of the display with SDL? Or is it
all or nothing, IE the lock/unlock will copy the entire offscreen buffer to
the display. I see the updaterectangles…But since lock/unlock might be
necessary, does that mean you can’t always count on updaterectangles?
Is it that you check first to see if lock/unlock are required, and if they
aren’t you can get better performance by using updaterectangles (if you
don’t need to copy over the whole display)?
The reason I’m asking is because games like scavenger and bomberman can get
by only copying small areas. My X windows version of scavenger uses < 1% of
the cpu to maintain the display. But the SDL equivalent, copying the entire
screen buffer every frame, couldn’t promise 50 frames/second on just about
any hardware. And it’d eat up cpu time.
If I’m right about the lock/unlock, wouldn’t it be possible to have an
unlock but not copy/update the entire screen? As in lock, modify offscreen
buffer, do updaterectangles, then unlocknocopy?
Sorry if this is all old news and explained somewhere…
-Dave