Microsoft DirectX 8.1 (C++)

IDirect3DDevice8::SetVertexShader

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

HRESULT SetVertexShader(
  DWORD Handle
);

Parameters

Handle
[in] Handle to a vertex shader, specifying the vertex shader to set. The value for this parameter can be the handle returned by IDirect3DDevice8::CreateVertexShader, or an FVF code. An FVF code is a combination of Flexible Vertex Format Flags.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

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.

Requirements

  Header: Declared in D3d8.h.
  Import Library: Use D3d8.lib.

See Also

IDirect3DDevice8::GetVertexShader