Original Post
Hi everyone, My game capture app needs to copy screen data to memory. after hooking and rerouting the Present function into my function, I GetBackBuffer, then CreateOffscreenPlainSurface (with D3DPOOL_SYSTEMMEM), then GetRenderTargetData from the backbuffer into the offscreen surface, and then - alas - LockRect the surface and memcpy the bits. Everything takes really fast, except one thing: the LockRect. it takes around 50ms, on some games. since I'm stalling the Present, the frame rate drops I tried using all the flags in LockRect (including D3DLOCK_DONOTWAIT!) but to no avail. I understood (thanks MS MVP Richard!) GetRenderTargetData queues a request for the data, and LockRect flushes it, so it take a long time I wondered if you have any ideas to speed it up/circumvent this. * What do you think about maybe GetRenderData to buffer N, but LockRect-ing buffer N-1? * What about a callback that I can receive, or poll somewhere, to know when LockRect finishes? * Last, what do you think about capturing the front buffer from another thread altogether? that should not harm the game frame rate? any other tricks to capture the screen fast? thanks very much for _any_ thought, J