Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why UVAtlasCreate()'s Parameter "vMeshOutIndexBuffer" is type of uint8_t? #66

Closed
orangeagain opened this issue May 10, 2021 · 1 comment

Comments

@orangeagain
Copy link

parameter:vMeshOutIndexBuffer is vector<uint8_t>, Is that mean the single value always below 256?

 HRESULT __cdecl UVAtlasCreate(
        _In_reads_(nVerts)                  const XMFLOAT3* positions,
        _In_                                size_t nVerts,
        _When_(indexFormat == DXGI_FORMAT_R16_UINT, _In_reads_bytes_(nFaces * 3 * sizeof(uint16_t)))
        _When_(indexFormat != DXGI_FORMAT_R16_UINT, _In_reads_bytes_(nFaces * 3 * sizeof(uint32_t))) const void* indices,
        _In_                                DXGI_FORMAT indexFormat,
        _In_                                size_t nFaces,
        _In_                                size_t maxChartNumber,
        _In_                                float maxStretch,
        _In_                                size_t width,
        _In_                                size_t height,
        _In_                                float gutter,
        _In_reads_(nFaces * 3)                const uint32_t* adjacency,
        _In_reads_opt_(nFaces * 3)            const uint32_t* falseEdgeAdjacency,
        _In_reads_opt_(nFaces * 3)            const float* pIMTArray,
        _In_opt_                            std::function<HRESULT __cdecl(float percentComplete)> statusCallBack,
        _In_                                float callbackFrequency,
        _In_                                UVATLAS options,
        _Inout_ std::vector<UVAtlasVertex>& vMeshOutVertexBuffer,
        _Inout_ std::vector<uint8_t>& vMeshOutIndexBuffer,
        _Inout_opt_ std::vector<uint32_t>* pvFacePartitioning = nullptr,
        _Inout_opt_ std::vector<uint32_t>* pvVertexRemapArray = nullptr,
        _Out_opt_                           float* maxStretchOut = nullptr,
        _Out_opt_                           size_t* numChartsOut = nullptr);
@walbourn
Copy link
Member

The vMeshOutIndexBuffer can be either 16-bit or 32-bit indices based on the input value of indexFormat. I've updated the wiki with more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants