Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDirect3DDevice9::CreateVertexShader method

Creates a vertex shader.

Syntax


HRESULT CreateVertexShader(
  [in]           const DWORD *pFunction,
  [out, retval]  IDirect3DVertexShader9 **ppShader
);

Parameters

pFunction [in]

Type: const DWORD*

Pointer to an array of tokens that represents the vertex shader, including any embedded debug and symbol table information.

ppShader [out, retval]

Type: IDirect3DVertexShader9**

Pointer to the returned vertex shader interface (see IDirect3DVertexShader9).

Return value

Type: HRESULT

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:

  • 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. To switch a mixed-mode device between software and hardware processing, use IDirect3DDevice9::SetSoftwareVertexProcessing.

For an example using D3DXCompileShader, see HLSLwithoutEffects Sample.

Requirements

Header

D3D9.h

Library

D3D9.lib

 

 

Community Additions

Show:
© 2014 Microsoft