D3DXCreateMeshFVF function

Creates a mesh object using a flexible vertex format (FVF) code.

Syntax

HRESULT D3DXCreateMeshFVF(
  _In_  DWORD             NumFaces,
  _In_  DWORD             NumVertices,
  _In_  DWORD             Options,
  _In_  DWORD             FVF,
  _In_  LPDIRECT3DDEVICE9 pD3DDevice,
  _Out_ LPD3DXMESH        *ppMesh
);

Parameters

NumFaces [in]

Type: DWORD

Number of faces for the mesh. The valid range for this number is greater than 0, and one less than the max DWORD value, typically 2³² - 1, because the last index is reserved.

NumVertices [in]

Type: DWORD

Number of vertices for the mesh. This parameter must be greater than 0.

Options [in]

Type: DWORD

Combination of one or more flags from the D3DXMESH enumeration, specifying creation options for the mesh.

FVF [in]

Type: DWORD

Combination of D3DFVF that describes the vertex format for the returned mesh. This function does not support D3DFVF_XYZRHW.

pD3DDevice [in]

Type: LPDIRECT3DDEVICE9

Pointer to an IDirect3DDevice9 interface, the device object to be associated with the mesh.

ppMesh [out]

Type: LPD3DXMESH*

Address of a pointer to an ID3DXMesh interface, representing the created mesh object.

Return value

Type: HRESULT

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.

Requirements

Requirement Value
Header
D3DX9Mesh.h
Library
D3dx9.lib

See also

Mesh Functions

D3DXFVFFromDeclarator