-
Notifications
You must be signed in to change notification settings - Fork 150
UVAtlasApplyRemap
Chuck Walbourn edited this page Jan 21, 2022
·
4 revisions
UVAtlas |
---|
This function applies a vertex remap from UVAtlasCreate or UVAtlasPartition to a vertex buffer if data beyond the content of UVAtlasVertex
is used.
The data from the uv texture coordinates in vMeshOutVertexBuffer must be merged into the final VB after applying the remap.
HRESULT UVAtlasApplyRemap(
const void* vbin, size_t stride, size_t nVerts,
size_t nNewVerts, const uint32_t* vertexRemap, void* vbout );
This is the pseudo-code for applying the UVAtlas vertex remap to a vertex buffer:
for each j in nTotalVerts
oldIndex = vertexRemap[ j ];
if (oldIndex != -1)
assert( oldIndex < nVerts );
memcpy( newVB + j * stride,
oldVB + oldIndex * stride,
stride )
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