DirecDraw Lock() and Unlock()

Started by
5 comments, last by Darkor 23 years, 9 months ago
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.
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!..
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
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?
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
In DX8 I heard you won''t be able to lock the primary surface.

lntakitopi@aol.com | http://geocities.com/guanajam/
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

---[home page] [[email=karmalaa@inwind.it]e-mail[/email]]

This topic is closed to new replies.

Advertisement