Jump to content
  • Advertisement

Archived

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

McLin

surface locking time

This topic is 5998 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!