IDirect3DDevice9::CreateVertexShader

Creates a vertex shader.

HRESULT CreateVertexShader(
  CONST DWORD * pFunction,
  IDirect3DVertexShader9** ppShader
);

Parameters

pFunction
[in] Pointer to an array of tokens that represents the vertex shader, including any embedded debug and symbol table information.
ppShader
[out, retval] Pointer to the returned vertex shader interface (see IDirect3DVertexShader9).

Return Values

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY.

Remarks

When a device is created, IDirect3D9::CreateDevice uses the behavior flag to determine whether to process vertices in hardware or software. There are three possibilities:

For an example using D3DXCompileShader, see HLSLwithoutEffects Sample.

Requirements

Header: Declared in D3d9.h.