Skip to main content
gamedev.net
🔒 Locked

surface locking time

Started by McLin Jan 15, 2002 at 2:47 AM 1 replies 800+ views
Original Post
McLin
McLin
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
Lammoth
Lammoth
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 ^^
McLin
McLin
thanx for the reply lammoth
how do i load a bitmap into an array? can you use the BITMAP.bmBits value after loading it with LoadImage?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.