D3D10CompileEffectFromMemory function (d3d10effect.h)
Compile an effect.
Syntax
HRESULT D3D10CompileEffectFromMemory(
[in] void *pData,
[in] SIZE_T DataLength,
[in] LPCSTR pSrcFileName,
[in] const D3D10_SHADER_MACRO *pDefines,
[in] ID3D10Include *pInclude,
[in] UINT HLSLFlags,
[in] UINT FXFlags,
[out] ID3D10Blob **ppCompiledEffect,
[out] ID3D10Blob **ppErrors
);
Parameters
[in] pData
Type: void*
A pointer to effect data; either ASCII HLSL code or a compiled effect.
[in] DataLength
Type: SIZE_T
Length of pData.
[in] pSrcFileName
Type: LPCSTR
The name of the effect file.
[in] pDefines
Type: const D3D10_SHADER_MACRO*
Optional. An array of NULL-terminated macro definitions (see D3D10_SHADER_MACRO).
[in] pInclude
Type: ID3D10Include*
Optional. A pointer to an ID3D10Include Interface for handling include files. Setting this to NULL will cause a compile error if a shader contains a #include.
[in] HLSLFlags
Type: UINT
Shader compile options.
[in] FXFlags
Type: UINT
Effect compile options.
[out] ppCompiledEffect
Type: ID3D10Blob**
The address of a ID3D10Blob Interface that contains the compiled effect.
[out] ppErrors
Type: ID3D10Blob**
Optional. A pointer to an ID3D10Blob Interface that contains compiler error messages, or NULL if there were no errors.
Return value
Type: HRESULT
Returns one of the following Direct3D 10 Return Codes.
Remarks
This function uses the version of the HLSL compiler released in the November 2006 DirectX SDK.
For an example, see Compile an Effect (Direct3D 10).
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d10effect.h |
Library | D3D10.lib |
DLL | D3D10.dll |