This topic has not yet been rated - Rate this topic

D3DX10CreateShaderResourceViewFromResource function

Create a shader-resource view from a resource.

Syntax


HRESULT D3DX10CreateShaderResourceViewFromResource(
  _In_   ID3D10Device *pDevice,
  _In_   HMODULE hSrcModule,
  _In_   LPCTSTR pSrcResource,
  _In_   D3DX10_IMAGE_LOAD_INFO *pLoadInfo,
  _In_   ID3DX10ThreadPump *pPump,
  _Out_  ID3D10ShaderResourceView **ppShaderResourceView,
  _Out_  HRESULT *pHResult
);

Parameters

pDevice [in]

Type: ID3D10Device*

A pointer to the device (see ID3D10Device Interface) that will use the resource.

hSrcModule [in]

Type: HMODULE

Handle to the resource module containing the shader-resource view. HMODULE can be obtained with GetModuleHandle Function.

pSrcResource [in]

Type: LPCTSTR

Name of the shader resource view in hSrcModule. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

pLoadInfo [in]

Type: D3DX10_IMAGE_LOAD_INFO*

Optional. Identifies the characteristics of a texture (see D3DX10_IMAGE_LOAD_INFO) when the data processor is created; set this to NULL to read the characteristics of a texture when the texture is loaded.

pPump [in]

Type: ID3DX10ThreadPump*

A pointer to a thread pump interface (see ID3DX10ThreadPump Interface). If NULL is specified, this function will behave synchronously and will not return until it is finished.

ppShaderResourceView [out]

Type: ID3D10ShaderResourceView**

Address of a pointer to the shader-resource view (see ID3D10ShaderResourceView Interface).

pHResult [out]

Type: HRESULT*

A pointer to the return value. May be NULL. If pPump is not NULL, then pHResult must be a valid memory location until the asynchronous execution completes.

Return value

Type: HRESULT

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

Requirements

Header

D3DX10Tex.h

Library

D3DX10.lib

See also

General Purpose Functions

 

 

Build date: 11/28/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.