D3DX10SaveTextureToMemory function

Save a texture to memory.

Syntax

HRESULT D3DX10SaveTextureToMemory(
  _In_  ID3D10Resource           *pSrcTexture,
  _In_  D3DX10_IMAGE_FILE_FORMAT DestFormat,
  _Out_ LPD3D10BLOB              *ppDestBuf,
  _In_  UINT                     Flags
);

Parameters

pSrcTexture [in]

Type: ID3D10Resource*

Pointer to the texture to be saved. See ID3D10Resource Interface.

DestFormat [in]

Type: D3DX10_IMAGE_FILE_FORMAT

The format the texture will be saved as. See D3DX10_IMAGE_FILE_FORMAT.

ppDestBuf [out]

Type: LPD3D10BLOB*

Address of a pointer to the memory containing the saved texture. See ID3D10Blob Interface.

Flags [in]

Type: UINT

Optional.

Return value

Type: HRESULT

The return value is one of the values listed in Direct3D 10 Return Codes.

Requirements

Requirement Value
Header
D3DX10Tex.h
Library
D3DX10.lib

See also

Texture Functions in D3DX 10

General Purpose Functions