[SDL] A couple questions on SDL
John Giors
jgiors at yahoo.com
Thu Jul 13 14:05:48 PDT 2006
>>>>> Lilith wrote >>>>>
>
>I'm getting my feet wet with SDL and, in a great sense, video graphics
>in general...
>
>...My purpose is to restore the background under
>a blitted surface to it's original content before redrawing the object
>at a displaced position...
Since you're new to gfx programming, I thought I should mention:
It is not so common to move objects as you've described above. In most
applications/games (especially when scrolling and/or double-buffered), the
entire background is blitted each frame which "clears" the background to it's
original state, then the moving "sprites" are drawn over that background.
This eliminates the need to store and re-draw small pieces of the background
(which was a common technique in the "good ol' days" before blitter chips).
But the decision about which way to go is implementation-specific, so it
depends upon what you're making. In any case, I hope this info's useful.
-- JohnG
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the SDL
mailing list