Game Development Reference
In-Depth Information
Flags —Optimization flags that tell the method what kind of
optimizations to perform. These can be one or more of the
following:
D3DXMESHOPT_COMPACT —Removes unused indices and ver-
tices from the mesh
D3DXMESHOPT_ATTRSORT —Sorts the triangles by attribute
and generates an attribute table. This allows DrawSubset to
be more efficient (see section 10.5).
D3DXMESHOPT_VERTEXCACHE —Increases vertex cache rate
hits
D3DXMESHOPT_STRIPREORDER —Reorganizes the indices so
that triangle strips can be as long as possible
D3DXMESHOPT_IGNOREVERTS —Optimizes index info only;
ignore vertices
Note: The D3DXMESHOPT_VERTEXCACHE and D3DXMESHOPT_
STRIPREORDER flags cannot be used together.
pAdjacencyIn —Pointer to the adjacency array of the
non-optimized mesh
pAdjacencyOut —Pointer to a DWORD array to be filled with the
adjacency info of the optimized mesh. The array must have
ID3DXMesh::GetNumFaces() * 3 elements. If you do not need
this info, pass 0.
pFaceRemap —Pointer to a DWORD array to be filled with the face
remap info. The array should be of size ID3DXMesh::GetNum-
Faces() . When a mesh is optimized, its faces may be moved
around in the index buffer. The face remap info tells where the orig-
inal faces have moved to; that is, the i th entry in pFaceRemap holds
the face index identifying where the i th original face has moved. If
you do not need this info, pass 0.
ppVertexRemap —Address of a pointer to an ID3DXBuffer (see
section 11.1) that will be filled with the vertex remap info. This
buffer should contain ID3DXMesh::GetNumVertices() verti-
ces. When a mesh is optimized, its vertices may be moved around
in the vertex buffer. The vertex remap info tells where the original
vertices have moved; that is, the i th entry in ppVertexRemap
holds the vertex index identifying where the i th original vertex has
moved. If you do not need this info, pass 0.
Team-Fly ®
Search WWH ::




Custom Search