IDirect3DDevice9::SetVertexDeclaration method

Sets a Vertex Declaration (Direct3D 9).

Syntax

HRESULT SetVertexDeclaration(
  IDirect3DVertexDeclaration9 *pDecl
);

Parameters

pDecl

Type: IDirect3DVertexDeclaration9*

Pointer to an IDirect3DVertexDeclaration9 object, which contains the vertex declaration.

Return Value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. The return value can be D3DERR_INVALIDCALL.

Remarks

A vertex declaration is an IDirect3DVertexDeclaration9 object that defines the data members of a vertex (i.e. texture coordinates, colors, normals, etc.). This data can be useful for implementing vertex shaders and pixel shaders.

Requirements

   
Target Platform Windows
Header d3d9helper.h (include D3D9.h)
Library D3D9.lib

See Also

IDirect3DDevice9

IDirect3DDevice9::GetVertexDeclaration