Skip to content

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 );

Remark

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 )

For Use

  • Universal Windows Platform apps
  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Xbox One
  • Xbox Series X|S
  • Windows Subsystem for Linux

Architecture

  • x86
  • x64
  • ARM64

For Development

  • 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

Related Projects

A python wrapper of UVAtlasTool

DirectXMesh

DirectXTex

DirectXMath

Tools

Test Suite

Content Exporter

DxCapsViewer

Clone this wiki locally