• Create Account

#ActualHodgman

Posted 08 November 2012 - 02:47 AM

Sorry, by map/unmap, I meant lock/unlock. All D3D9 calls must occur on your main thread. The worker can generate data in between a call to lock and unlock.
e.g.
D3DLOCKED_RECT result = {};
... later ...
texture->UnlockRect(0);

void* result = 0;
buffer->Lock(0, 0, &result, 0);
... later ...
buffer->Unlock();

#2Hodgman

Posted 08 November 2012 - 02:46 AM

Sorry, by map/unmap, I meant lock/unlock. All D3D9 calls must occur on your main thread. The worker can generate data in between a call to lock and unlock.
e.g.
D3DLOCKED_RECT result = {};
... later ...
texture->UnlockRect(0);

void* result = 0;
buffer->Lock(0, 0, &amp;result, 0);
... later ...
buffer->Unlock();

#1Hodgman

Posted 08 November 2012 - 02:45 AM

Sorry, by map/unmap, I meant lock/unlock. All D3D9 calls must occur on your main thread. The worker can generate data in between a call to lock and unlock.
e.g.
D3DLOCKED_RECT result = {};
buffer->Unlock();