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.
Note
Instead of using this legacy function, we recommend that you use the D3DPreprocess API.
Create a shader from memory without compiling it.
Syntax
HRESULT D3DX10PreprocessShaderFromMemory(
_In_ LPCSTR pSrcData,
_In_ SIZE_T SrcDataSize,
_In_ LPCSTR pFileName,
_In_ const D3D_SHADER_MACRO *pDefines,
_In_ LPD3D10INCLUDE pInclude,
_In_ ID3DX10ThreadPump *pPump,
_Out_ ID3D10Blob **ppShaderText,
_Out_ ID3D10Blob **ppErrorMsgs
);
Parameters
-
pSrcData [in]
-
Type: LPCSTR
Pointer to the memory containing the shader.
-
SrcDataSize [in]
-
Type: SIZE_T
Size of the shader.
-
pFileName [in]
-
Type: LPCSTR
Name of the shader.
-
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: LPD3D10INCLUDE
A pointer to an include interface (see ID3D10Include Interface); set this to NULL to specify there is no include file.
-
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.
-
ppShaderText [out]
-
Type: ID3D10Blob**
A pointer to memory (see ID3D10Blob Interface) that contains the uncompiled shader.
-
ppErrorMsgs [out]
-
Type: ID3D10Blob**
The address of a pointer to memory (see ID3D10Blob Interface) that contains effect-creation errors, if any occurred.
Return value
Type: HRESULT
The return value is one of the values listed in Direct3D 10 Return Codes.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also