| ?/TD> | 
| Microsoft DirectX 9.0 | 
Creates a vertex shader.
Syntax
HRESULT CreateVertexShader(
const DWORD *pFunction, IDirect3DVertexShader9** ppShader );
Parameters
- pFunction
 - [in] Pointer to the vertex shader function token array. This parameter defines the operations to apply to each vertex.
 - ppShader
 - [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_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. D3DERR_OUTOFVIDEOMEMORY Microsoft?Direct3D?does not have enough display memory to perform the operation. E_OUTOFMEMORY Direct3D could not allocate sufficient memory to complete the call. 
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.
- Process vertices in hardware by setting D3DCREATE_HARDWARE_VERTEXPROCESSING.
 - Process vertices in software by setting D3DCREATE_SOFTWARE_VERTEXPROCESSING.
 Process vertices in either hardware or software by setting D3DCREATE_MIXED_VERTEXPROCESSING.
Mixed-mode devices might need to switch between software and hardware processing after the device is created. In this case, use IDirect3DDevice9::SetSoftwareVertexProcessing.
See Also
IDirect3D9::CreateDevice, D3DXAssembleShader