-
Notifications
You must be signed in to change notification settings - Fork 152
FinalizeVBAndPointReps
DirectXMesh |
---|
Finishes mesh optimization by reordering vertices and/or adding duplicated vertices for the vertex buffer, and the point representatives.
HRESULT FinalizeVBAndPointReps(
const void* vbin, size_t stride, size_t nVerts, const uint32_t* prin,
const uint32_t* dupVerts, _In_ size_t nDupVerts,
const uint32_t* vertexRemap,
void* vbout, uint32_t* prout );
HRESULT FinalizeVBAndPointReps(
void* vb, size_t stride, size_t nVerts, uint32_t* pointRep,
const uint32_t* vertexRemap );
The vbin buffer (or vb for in-place finalize) must be nVerts*stride
bytes.
The prin buffer (or the pointRep for in-place finalize) must have nVerts elements.
The vbout buffer must be (nVerts+nDupVerts)*stride
bytes.
The prout buffer must have nVerts+nDupVerts
entries.
A vertexRemap is an array with nVerts+nDupVerts
elements that describes how to reorder the vertices of the original mesh: oldLoc = vertexRemap[newLoc]
. See OptimizeVertices. It can be nullptr for an 'identity' remap when just performing duplication.
dupVerts contains nDupVerts elements indicating vertices that need duplicating. Each entry indicates the index of the original vbin vertex buffer to duplicate. The vertexRemap array also indicates reorder information for the duplicated vertices (where oldLoc
is greater than nVerts
). dupVerts can be nullptr if nDupVerts is 0.
This version is used to maintain the point reps array after a vertex remap. If the point reps are not needed, use FinalizeVB instead.
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
- x86
- x64
- ARM64
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- GCC 10.5, 11.4, 12.3
- MinGW 12.2, 13.2
- CMake 3.20
DirectX Tool Kit for DirectX 11