Export (0) Print
Expand All
Expand Minimize

IDirect3DDevice9::GetRenderTargetData method

Copies the render-target data from device memory to system memory.

Syntax


HRESULT GetRenderTargetData(
  [in]  IDirect3DSurface9 *pRenderTarget,
  [in]  IDirect3DSurface9 *pDestSurface
);

Parameters

pRenderTarget [in]

Type: IDirect3DSurface9*

Pointer to an IDirect3DSurface9 object, representing a render target.

pDestSurface [in]

Type: IDirect3DSurface9*

Pointer to an IDirect3DSurface9 object, representing a destination surface.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_DRIVERINTERNALERROR, D3DERR_DEVICELOST, D3DERR_INVALIDCALL.

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.

Requirements

Header

D3D9.h

Library

D3D9.lib

 

 

Community Additions

ADD
Show:
© 2015 Microsoft