CreateShaderResourceView

Creates a Direct3D 11 resource and shader resource view from a set of images.

Syntax

HRESULT CreateShaderResourceView(
         ID3D11Device *pDevice,
         const Image *srcImages,
         size_t nimages,
         const TexMetadata &metadata,
         ID3D11ShaderResourceView **ppSRV
)  

Parameters

pDevice
Type: ID3D11Device *

[in] A DirectX 11 device, as a pointer to an ID3D11Device.

srcImages
Type: Image *

[in] Pointer to one or more Image structures in a memory buffer.

nimages
Type: size_t 

[in] Number of images.

metadata
Type: TexMetadata 

[in] Address of a TexMetadata structure.

ppSRV
Type: ID3D11ShaderResourceView **

[out] The shader resource view, as a pointer to an ID3D11ShaderResourceView instance.

Return value

Type: HRESULT 

Success or error code.

Requirements

Header: Declared in directxtex.h.