IDirect3DDevice9::SetVertexDeclaration method (d3d9helper.h)

Sets a Vertex Declaration (Direct3D 9).

Syntax

HRESULT SetVertexDeclaration(
  [in] IDirect3DVertexDeclaration9 *pDecl
);

Parameters

[in] 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

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

See also

IDirect3DDevice9

IDirect3DDevice9::GetVertexDeclaration