Microsoft DirectX 9.0

IDirect3DDevice9::CreateVertexShader Method

Creates a vertex shader.


HRESULT CreateVertexShader(      

    const DWORD *pFunction,     IDirect3DVertexShader9** ppShader );


[in] Pointer to the vertex shader function token array. This parameter defines the operations to apply to each vertex.
[out, retval] Pointer to the returned vertex shader interface. See IDirect3DVertexShader9.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values.

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DERR_OUTOFVIDEOMEMORYMicrosoft?Direct3D?does not have enough display memory to perform the operation.
E_OUTOFMEMORYDirect3D could not allocate sufficient memory to complete the call.


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.

See Also

IDirect3D9::CreateDevice, D3DXAssembleShader

© 2002 Microsoft Corporation. All rights reserved.