|Microsoft DirectX 9.0|
Compile a shader from an effect that contains one or more functions.
D3DXHANDLE hFunction, DWORD Target, DWORD Flags, LPD3DXBUFFER *ppShader, LPD3DXBUFFER *ppErrorMsgs, LPD3DXSHADER_CONSTANTTABLE *ppConstantTable );
- [in] Unique identifier to the function to be compiled. This value must not be NULL. See Handles.
- [in] Identifies the compile target. The compile target is the shader version encoded in a DWORD. Use the D3DVS_VERSION macro to generate the encoded version number. This method currently supports compiling a vertex shader only.
- [in] Compile options. For more information, see D3DXSHADER.
- [out, retval] Buffer containing the compiled shader. The compiler shader is an array of DWORDs. For more information about accessing the buffer, see ID3DXBuffer.
- [out, retval] Buffer containing at least the first compile error message that occurred. This includes effect compiler errors and high-level language compile errors. For more information about accessing the buffer, see ID3DXBuffer.
- [out, retval] Pointer to the constant table. For more information about the contents of the constant table, see D3DXSHADER_CONSTANTTABLE. Alternatively, the constant table can be accessed using D3DXGetShaderConstantTable.
If the method succeeds, the return value is S_OK.
If the arguments are invalid, the method will return D3DERR_INVALIDCALL.
If the method fails, the return value will be E_FAIL.
This method compiles a shader from a function that is written in a C-like language. For more information, see High-Level Shader Language.