Getting the front buffer into a gfx mem surface (Dx9)
- by lapin
I'm using DirectX 9 to acquire the frontbuffer. There are a couple of ways I know of to get at the front buffer:
GetRenderTargetData()
GetFrontBufferData()
The MSDN page on both of these API calls state that the data is copied from device memory to system memory. I'd like to copy the front buffer surface directly to another graphics memory surface, as I have other manipulations to perform on the acquired surface before returning it to system memory.
I'm creating a D3DUSAGE_DYNAMIC texture (gfx mem texture) and calling GetFrontBufferData() to write the front buffer to my textures surface0. Is this valid? Will the operation remain in gfx memory, or will it need to move to system memory and then back to graphics memory? If this is the case, is what I'm trying to achieve possible?