D3DX10PreprocessShaderFromFile function
Note
Instead of using this legacy function, we recommend that you use the D3DPreprocess API.
Create a shader from a file without compiling it.
Syntax
HRESULT D3DX10PreprocessShaderFromFile(
_In_ LPCTSTR pFileName,
_In_ const D3D10_SHADER_MACRO *pDefines,
_In_ LPD3D10INCLUDE pInclude,
_In_ ID3DX10ThreadPump *pPump,
_Out_ ID3D10Blob **ppShaderText,
_Out_ ID3D10Blob **ppErrorMsgs
);
Parameters
-
pFileName [in]
-
Type: LPCTSTR
Name of the shader file.
-
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 |
|
See also