Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Create an effect from memory.
Syntax
HRESULT D3DX10CreateEffectFromMemory(
_In_ LPCVOID pData,
_In_ SIZE_T DataLength,
_In_ LPCSTR pSrcFileName,
_In_ const D3D_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
-
pData [in]
-
Type: LPCVOID
Pointer to the effect in memory.
-
DataLength [in]
-
Type: SIZE_T
Size of the effect in memory.
-
pSrcFileName [in]
-
Type: LPCSTR
Name of the effect file in memory.
-
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 D3D10_EFFECT Constants).
-
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
Requirement | Value |
---|---|
Header |
|
See also