Jump to content
  • Advertisement

Archived

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

Darkor

DirecDraw Lock() and Unlock()

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

In DirectX 7, is it true that you no longer need to lock and unlock surfaces? In the book "Sams Teach Yourself -DirectX 7", I am unable to find any steps which include these functions. I too have "Real-Time Strategy Game Programming Using MS DirectX 6.0" and these functions are used but it is somewhat confusing the way the author uses them. Could someone explain them to me? However, I have no trouble understanding "Tricks of the Windows Game Programming Gurus" book. Any help would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
You only need to lock/unlock if you want to access the surface directly.. You don''t have to do it if you don''t want to, even in previous version of dx (except when loading data from a bitmap)..

From Singapore.. Me too!..

Share this post


Link to post
Share on other sites
If you want to draw a pixel or a line you just lock it, but for 2D apps you would not normally need to do this because it has hardware sprite functions. You still can though.

#pragma twice

Share this post


Link to post
Share on other sites
Thanx! I think I understand it now!

For manipulation of the pointer to the memory, you must lock the surface to and it must be unlocked to be able to use member functions like BitBlt() right?

Thanx a bunch again!

And Void, do you play CS?

Share this post


Link to post
Share on other sites
CS?? counter strike???

Not too much.. but the guys at the office here play it almost every night (even when the boss is around..)

I think this is not the place for this.. mail me darkaurora@yahoo.com

Share this post


Link to post
Share on other sites
quote:
Original post by SHilbert

In DX8 I heard you won''t be able to lock the primary surface.




Well, I think it''s quite a bad habit to lock the primary surface...


Karmalaa

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!