CD3D11_SHADER_RESOURCE_VIEW_DESC::CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture2D*,D3D11_SRV_DIMENSION,DXGI_FORMAT,UINT,UINT,UINT,UINT) function (d3d11.h)

Instantiates a new instance of a CD3D11_SHADER_RESOURCE_VIEW_DESC structure that is initialized with 2D texture values.

Syntax

void CD3D11_SHADER_RESOURCE_VIEW_DESC(
  ID3D11Texture2D     *pTex2D,
  D3D11_SRV_DIMENSION viewDimension,
  DXGI_FORMAT         format,
  UINT                mostDetailedMip,
  UINT                mipLevels,
  UINT                firstArraySlice,
  UINT                arraySize
);

Parameters

pTex2D

A pointer to a ID3D11Texture2D interface for a 2D texture.

viewDimension

A D3D11_SRV_DIMENSION-typed value that specifies the resource type of the view.

format

A DXGI_FORMAT-typed value that specifies the viewing format.

mostDetailedMip

Index of the most detailed mipmap level to use; this number is from 0 to mipLevels -1.

mipLevels

The maximum number of mipmap levels for the view.

firstArraySlice

The index of the first element to use in an array of elements. First2DArrayFace of D3D11_TEXCUBE_ARRAY_SRV.

arraySize

Number of elements in the array. NumCubes of D3D11_TEXCUBE_ARRAY_SRV.

Return value

None

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11.h
Library D3D11.lib

See also

CD3D11_SHADER_RESOURCE_VIEW_DESC