Skip to main content
GameDev.net gamedev.net
🔒 Locked

Quick question on locking a surface...

Started by serratemplar Oct 17, 2000 at 11:38 PM 2 replies 150+ views
Original Post
serratemplar
serratemplar
Please tell me if I this statement is correct: I only have to lock a surface if I am accessing the memory within it directly. That is to say, I do not have to lock a surface when I use the blitter. Is this true or false? =) I imagine it is important and I fear weird errors and problems cropping up without explanation since it''s working now w/o locking but I''m not certain of the truth. You guys rock; thanks! Maybe someday...*I''ll* be able to answer questions for people like me =) ~Steve
Quantum
Quantum
true.
you only need to lock the surface when you want a direct pointer to the video memory
otherwise you just let DX handle it for you
furby100
furby100
You do not need to lock when you use Blt or BltFast. In fact you will get an error if you do. So you should not lock when you Blt or BltFast, but you should lock if you plan on accessing the memory directly through a pointer.

------------------------------
#pragma twice


sharewaregames.20m.com

Topic Locked

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

Sign in to reply to this topic.