|
-
Dec 21st, 2002, 09:01 AM
#1
Thread Starter
Ex-Super Mod'rater
Locking DirectDraw Surfaces *[Resolved]*
If I Lock a section of a surafce, area O1 (which is a RECT), then call GetLockedArray B1() should I just get a byte array for the locked area or does it give me the whole surface?
VB Code:
Sur1.Lock O1, Sur1Desc, DDLOCK_WAIT, 0
Sur1.GetLockedArray B1()
For i = 0 To UBound(B1, 1) - 1 Step 3
For j = 0 To UBound(B1, 2)
Next
Next
Sur1.Unlock O1
When I do this it seems to give an area bigger than O1. I'm not sure wheather I should be using Step 4 instead of 3 because its running in 32bit but "(UBound(B1, 1) - 1)/3" is 42 and "(UBound(B1, 1) - 1)/4" is 31.5 for a 32*32 surface, and if theres a remander theres bytes getting missed.Mind "UBound(B1, 2)" is 31 so step 4 would make sense, apart from the remander, because that means 32 elements each way.
Could someone please point me in the right direct. Thanx.
Last edited by Electroman; Sep 20th, 2004 at 09:12 AM.
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|