Export (0) Print
Expand All

D3DX10CreateEffectFromResource function

Create an effect from a resource.

Syntax


HRESULT D3DX10CreateEffectFromResource(
  _In_   HMODULE hModule,
  _In_   LPCTSTR pResourceName,
  _In_   LPCTSTR pSrcFileName,
  _In_   const D3D10_SHADER_MACRO *pDefines,
  _In_   ID3D10Include *pInclude,
  _In_   LPCSTR pProfile,
  _In_   UINT HLSLFlags,
  _In_   UINT FXFlags,
  _In_   ID3D10Device *pDevice,
  _In_   ID3D10EffectPool *pEffectPool,
  _In_   ID3DX10ThreadPump *pPump,
  _Out_  ID3D10Effect **ppEffect,
  _Out_  ID3D10Blob **ppErrors,
  _Out_  HRESULT *pHResult
);

Parameters

hModule [in]

Type: HMODULE

A handle to the resource module containing the effect. HMODULE can be obtained with GetModuleHandle Function.

pResourceName [in]

Type: LPCTSTR

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

pSrcFileName [in]

Type: LPCTSTR

Optional. Effect file name, which is used for error messages only. Can be NULL.

pDefines [in]

Type: const D3D10_SHADER_MACRO*

A NULL-terminated array of shader macros (see D3D10_SHADER_MACRO); set this to NULL to specify no macros.

pInclude [in]

Type: ID3D10Include*

A pointer to an include interface (see ID3D10Include Interface). This parameter can be NULL.

pProfile [in]

Type: LPCSTR

A string that specifies the shader profile, or shader model.

HLSLFlags [in]

Type: UINT

HLSL compile options (see D3D10_SHADER Constants).

FXFlags [in]

Type: UINT

Effect compile options (see Compile and Effect Flags).

pDevice [in]

Type: ID3D10Device*

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

pEffectPool [in]

Type: ID3D10EffectPool*

Pointer to an effect pool (see ID3D10EffectPool Interface) for sharing variables between effects.

pPump [in]

Type: ID3DX10ThreadPump*

A pointer to a thread pump interface (see ID3DX10ThreadPump Interface). Use NULL to specify that this function should not return until it is completed.

ppEffect [out]

Type: ID3D10Effect**

Address of a pointer to the effect (see ID3D10Effect Interface) that is created.

ppErrors [out]

Type: ID3D10Blob**

The address of a pointer to memory (see ID3D10Blob Interface) that contains effect compile errors, if there were any.

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

D3DX10Async.h

See also

General Purpose Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft