-
Notifications
You must be signed in to change notification settings - Fork 156
UVAtlasApplyRemap
| 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 function will succeed with an S_OK or will return an HRESULT error code (E_INVALIDARG, E_OUTOFMEMORY, E_FAIL, E_POINTER, E_UNEXPECTED, HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), or HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)).
This function is marked noexcept, and does not throw C++ exceptions.
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 [email protected] 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 - v20
- GCC 10.5, 11.4, 12.3, 13.3, 14.2
- MinGW 12.2, 13.2
- CMake 3.21