C3DMesh::SetVertexFormat

Top  Previous  Next

Syntax:

 

SetVertexFormat(uint  fvf)

 

Purpose:

Specifies the vertex format (FVF) used by a custom mesh.

 

Parameters:

fvf - The flexible vertex format flags.

 

Returned value(s):

None.

 

Application:

mesh1.SetVertexFormat(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE)

 

Class Hierarchy

C3DObject

-------C3DMesh

 

Additional Info:

Microsoft Direct3D applications can define model vertices in several different ways. Support for flexible vertex definitions, also known as flexible vertex formats or flexible vertex format codes, makes it possible for your application to use only the vertex components it needs, eliminating those components that aren't used. By using only the needed vertex components, your application can conserve memory and minimize the processing bandwidth required to render models.

 

This method is used internally by CreateMesh and CreateMeshEx.  There is little reason to call this method directly.

 

See Also:

FVF Constants