Getting the front buffer into a gfx mem surface (Dx9)

Posted by lapin on Game Development See other posts from Game Development or by lapin
Published on 2012-06-11T10:14:10Z Indexed on 2012/06/11 10:48 UTC
Read the original article Hit count: 222

Filed under:
|

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?

© Game Development or respective owner

Related posts about c++

Related posts about directx9