IDirect3DRMMeshBuilder::AddFaces
HRESULT AddFaces(DWORD dwVertexCount, D3DVECTOR * lpD3DVertices,
DWORD normalCount, D3DVECTOR *lpNormals, DWORD *lpFaceData,
LPDIRECT3DRMFACEARRAY* lplpD3DRMFaceArray);
Adds faces to a Direct3DRMMeshBuilder object.
·Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.
dwVertexCount
Number of vertices.
lpD3DVertices
Base address of an array of D3DVECTOR structures that stores the vertex positions.
normalCount
Number of normals.
lpNormals
Base address of an array of D3DVECTOR structures that stores the normal positions.
lpFaceData
For each face, this parameter should contain a vertex count followed by the indices into the vertices array. If normalCount is not zero, this parameter should contain a vertex count followed by pairs of indices, with the first index of each pair indexing into the array of vertices, and the second indexing into the array of normals. The list of indices must terminate with a zero.
lplpD3DRMFaceArray
Address of a pointer to an IDirect3DRMFaceArray interface that will be filled with a pointer to the newly created faces.