D3DX10CreateEffectPoolFromFile function
Create an effect pool from an effect file.
HRESULT D3DX10CreateEffectPoolFromFile(
_In_ LPCTSTR pFileName,
_In_ const D3D_SHADER_MACRO *pDefines,
_In_ ID3D10Include *pInclude,
_In_ LPCSTR pProfile,
_In_ UINT HLSLFlags,
_In_ UINT FXFlags,
_In_ ID3D10Device *pDevice,
_In_ ID3DX10ThreadPump *pPump,
_Out_ ID3D10EffectPool **ppEffectPool,
_Out_ ID3D10Blob **ppErrors,
_Out_ HRESULT *pHResult
);
-
pFileName [in]
-
Type: LPCTSTR
The effect filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.
-
pDefines [in]
-
Type: const D3D_SHADER_MACRO*
A NULL-terminated array of shader macros (see D3D_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.
-
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.
-
ppEffectPool [out]
-
Type: ID3D10EffectPool**
The address of a pointer to the effect pool (see ID3D10EffectPool Interface).
-
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.
Type: HRESULT
The return value is one of the values listed in Direct3D 10 Return Codes.
This example creates an effect pool from the effect used in the BasicHLSL10 Sample.
// Create an effect pool from an effect in memory
ID3D10EffectPool * l_pEffectPool = NULL;
ID3D10Blob* l_pBlob_Errors = NULL;
WCHAR str[MAX_PATH];
hr = DXUTFindDXSDKMediaFileCch( str, MAX_PATH, L"BasicHLSL10.fx" );
hr = D3DX10CreateEffectPoolFromFile( str,
NULL, NULL, D3D10_SHADER_ENABLE_STRICTNESS,
0, pd3dDevice, NULL, &l_pEffectPool,
&l_pBlob_Errors );
Requirement | Value |
---|---|
Header |
|