ID3DXInclude is a user-implemented interface to provide callbacks for #include directives during shader compilation. Each of the methods in this interface must be implemented by the user which will then be used as callbacks to the application when one of the following occurs:
- An HLSL shader that contains a #include is compiled by calling one of the D3DXCompileShader*** functions.
- An assembly shader #include is assembled by calling any of the D3DXAssembleShader*** functions.
- An effect that contains a #include is compiled by by calling any of the D3DXCreateEffect*** or D3DXCreateEffectCompiler*** functions.
The ID3DXInclude interface inherits from the IUnknown interface. ID3DXInclude also has these types of members:
The ID3DXInclude interface has these methods.
A user-implemented method for closing a shader #include file.
A user-implemented method for opening and reading the contents of a shader #include file.
A user creates an ID3DXInclude interface by implementing a class that derives from this interface, and implementing all the interface methods.
The LPD3DXINCLUDE type is defined as a pointer to this interface.
typedef interface ID3DXInclude ID3DXInclude; typedef interface ID3DXInclude *LPD3DXINCLUDE;