Citation :
As you probably know, VIDEO RAM is much slower than "normal" RAM, so
* it's advisable to reduce VRAM blits to a minimum.
* So, drawing sprite on the screen (I mean in VRAM) and then clearing
* a background for him is not very fast. I've used a different method which
* is much faster, but require a bit more memory.
* I clear a buffer (it's a normal BITMAP), then I draw sprite to it, and
* after all I blit only one time this buffer to the screen. So, I'm using a
* single VRAM blit instead of blitting/clearing background and drawing
* a sprite on it. It's a good method even when I have to restore background.
* And of course, it completely remove flickering effect.
* When one uses a big (ie. 800x600 background) and draws something on it,
* it's wise to use a copy of background somewhere in memory and restore
* background using this "virtual background". When blitting from VRAM in SVGA
* modes, it's probably, that drawing routines have to switch banks on video
* card. I think, I don't have to remind how slow is it.
|