![]() |
![]() |
![]() |
Copies the render-target data from device memory to system memory.
Syntax
HRESULT GetRenderTargetData(
IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface );
Parameters
- pRenderTarget
- [in] Pointer to an IDirect3DSurface9 object, representing a render target.
- pDestSurface
- [in] Pointer to an IDirect3DSurface9 object, representing a destination surface.
Return Value
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be one of the following values.
D3DERR_DRIVERINTERNALERROR Internal driver error. Applications should generally shut down when receiving this error. For more information, see Driver Internal Errors.
D3DERR_DEVICELOST The device has been lost but cannot be reset at this time. Therefore, rendering is not possible. D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value.
Remarks
The destination surface must be either an off-screen plain surface or a level of a texture (mipmap or cube texture) created with D3DPOOL_SYSTEMMEM.
The source surface must be a regular render target or a level of a render-target texture (mipmap or cube texture) created with POOL_DEFAULT.
This method will fail if:
- The render target is multisampled.
- The source render target is a different size than the destination surface.
- The source render target and destination surface formats do not match.