ID3D10Texture2D::Map method

Get a pointer to the data contained in a subresource, and deny GPU access to that subresource.

Syntax

HRESULT Map(
  UINT                   Subresource,
  D3D10_MAP              MapType,
  UINT                   MapFlags,
  D3D10_MAPPED_TEXTURE2D *pMappedTex2D
);

Parameters

Subresource

Type: UINT

Index number of the subresource. See D3D10CalcSubresource for more details.

MapType

Type: D3D10_MAP

Integer that specifies the CPU's read and write permissions for a resource. For possible values, see D3D10_MAP.

MapFlags

Type: UINT

Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.

pMappedTex2D

Type: D3D10_MAPPED_TEXTURE2D*

Pointer to a structure (D3D10_MAPPED_TEXTURE2D) that is filled in by the function and contains a pointer to the resource data.

Return Value

Type: HRESULT

If this function succeeds, it returns S_OK.

All of the Map methods have identical return values and operating restrictions. These are listed in the remarks section of ID3D10Texture1D::Map.

Requirements

   
Target Platform Windows
Header d3d10.h
Library D3D10.lib

See Also

ID3D10Texture2D Interface