This project has moved and is read-only. For the latest updates, please go here.
Reorders the faces grouping together all those that use the same attribute id.

This optimizes draw submission by minimizing state changes and maximizing draw batches.

HRESULT AttributeSort(
   _In_ size_t nFaces, _Inout_updates_all_(nFaces) uint32_t* attributes,
   _Out_writes_(nFaces) uint32_t* faceRemap );


The attributes array is sorted by this function.

faceRemap indicates the new face ordering. See ReorderIB and ReorderIBAndAdjacency for details.


This function does not duplicate any vertices. The ideal attribute sort for vertex pre-transform cache optimization ensures that each vertex is only used once for a given attribute. This can be accomplished by calling Clean before doing this sort.

Last edited Jun 20, 2015 at 8:19 AM by walbourn, version 9