Archived

This topic is now archived and is closed to further replies.

McLin

surface locking time

Recommended Posts

ive been messing with DDraw for a few weeks now. I would like to write a blitter that can blt rotations or mirror images but i read that locking and unlocking surfaces takes a long time. i was wondering if it''s ok to lock/unlock every source surface? is it possible to directly access a bitmap object instead? thanks everyone

Share this post


Link to post
Share on other sites
I wouln''t suggest to lock anything, cause it really needs much time. But if you have to, make sure that your surface is in System Memory, not Video, cause Sysmem is much faster to lock.
And don''t lock the entire surface, only the part that has to be changed.

Well to change a bitmap in file needs to much time during a frame, so you have to load it. You can load it into an array, but then you have to lock the surface to copy the array to the surface. Well don''t lock anything ^^

Share this post


Link to post
Share on other sites