Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.SetVertexShader

Sets the current vertex shader to a previously created vertex shader or to a flexible vertex format (FVF) fixed function shader.

object.SetVertexShader( _ 
    VertexShaderHandle As Long)

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
VertexShaderHandle
Handle to a vertex shader, specifying the vertex shader to set. The value for this parameter can be the handle returned by Direct3DDevice8.CreateVertexShader, or an FVF code. An FVF code is a combination of flexible vertex format flags.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

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

Remarks

The effect of using an FVF code in place of the handle is to enable a fixed-function vertex shader, with an implicit declaration that matches the FVF code contents read from stream zero. Only stream zero is referenced when an FVF-specified shader is bound to the device.

See Also

Direct3DDevice8.GetVertexShader