direct draw

Started by
9 comments, last by GameDev.net 24 years, 6 months ago
The only real reason to store a sprite in a video memory surface is to take advantage of hardware-accelerated VidMem-VidMem blts.

Reading from video memory is a very bad idea, it is incredibly slow.

Writing to video memory is a bad idea also, it is incredibly slow (though not as slow as reading.)

If you want to write, read, and modify a sprite, and at the same time use blt, then you should use a system memory surface.

If you don't want to use blt, and just read or modify, then you should just use your own system memory buffer to avoid the lock()/Unlock() penatlies. If your hardware accelerates sysmem-vidmem blts (doubtful) you may want to then lock and copy into a system memory surface, then blt, otherwise lock the back buffer and copy your data in.

This topic is closed to new replies.

Advertisement