Jump to content
  • Advertisement

Archived

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

Zanthos

Surface Locking

This topic is 6001 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

I''m using DelphiX for a game, and was going to use DDraw alpha blending, and found it too slow, but when i looked at the actual DrawAlpha code, there was a Lock.. and a subsequent Unlock after the alphablit had been done. Why is locking necessary? I read in TOTWGPG it can take thousands of microseconds for a lock/unlock, which seems like a quick way of killing the frame rate. I''m going to try it removing the locking now, no idea if it''ll work or not, but if it does, why is the locking there?

Share this post


Link to post
Share on other sites
Advertisement
DelphiX isn''t a Microsoft product and alpha-blending routines provided in this Delphi component are made by Hiroyuki Hori. He does alpha-blending "manually" computing destination pixels. Lock/Unlock is needed to get access to source surfaces and it''s not what makes the code slow - multiplying thousands of pixels from/to Video memory is SLOW.
As solution, you''d try using Direct3D to accelerate these operations using hardware.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!