I'm using the following codes to copy D3D surface back to system memory, but the performance is bad when call LockRect operation, it spends lot of time of this function. Is there a way to improve it? Thanks in advance.
Below is sample codes.
D3DDev->GetRenderTargetData(renderTarget, offscreenSurface);
// Lock the surface to read pixels
offscreenSurface->LockRect( &lr, &rect, D3DLOCK_READONLY );