Microsoft DirectX 8.1 (C++) |
D3DXAssembleShader
Assembles an ASCII description of a shader into binary form, where the shader source is in memory.
HRESULT D3DXAssembleShader( LPCVOID pSrcData, UINT SrcDataLen, DWORD Flags, LPD3DXBUFFER* ppConstants, LPD3DXBUFFER* ppCompiledShader, LPD3DXBUFFER* ppCompilationErrors );
Parameters
- pSrcData
- [in] Pointer to the source code.
- SrcDataLen
- [in] Size of the source code, in bytes.
- Flags
- [in] A combination of the D3DXASM flags, specifying assembly options.
- ppConstants
- [out] Returns a pointer to an ID3DXBuffer interface, representing the returned constant declarations. These constants are returned as a vertex shader declaration fragment. It is up to the application to insert the contents of this buffer into their declaration. For pixel shaders this parameter is meaningless because constant declarations are included in the assembled shader. This parameter is ignored if it is NULL.
- ppCompiledShader
- [out] Returns a pointer to an ID3DXBuffer interface, representing the returned compiled object code. This parameter is ignored if it is NULL.
- ppCompilationErrors
- [out] Returns a pointer to an ID3DXBuffer interface, representing the returned ASCII error messages. This parameter is ignored if it is NULL.
Return Values
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be one of the following values.
D3DERR_INVALIDCALL |
D3DXERR_INVALIDDATA |
E_OUTOFMEMORY |
Requirements
Header: Declared in D3dx8core.h.
Import Library: Use D3dx8.lib.