Microsoft DirectX 8.1 (Visual Basic)

D3DX8.AssembleShader

Assembles an ASCII description of a pixel or vertex shader into binary form, where the shader source is in memory.

object.AssembleShader( _ 
    SrcData As Any, _ 
    Flags As Long, _ 
    Constants As D3DXBuffer) As D3DXBuffer

Parts

object
Object expression that resolves to a D3DX8 object.
SrcData
Source code from which to assemble the shader.
Flags
A combination of the members of the CONST_D3DXASM type, specifying assembly options.
Constants
D3DXBuffer object, to be filled with the 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.

Return Values

Returns a D3DXBuffer object, containing the compiled object code.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DXERR_INVALIDDATA
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.