Fixed topologyConvert strip conversion. Fixed Uint10 vertex packing. (#3889)

This commit is contained in:
Branimir Karadžić
2026-08-14 23:11:26 +00:00
committed by GitHub
parent b12eef18b5
commit faa00a1639
2 changed files with 12 additions and 11 deletions
+3 -2
View File
@@ -46,7 +46,7 @@ namespace bgfx
{
const uint32_t numIndices = isEven(_numIndices) ? _numIndices + 1 : _numIndices;
if (NULL != _dst)
if (NULL == _dst)
{
return numIndices;
}
@@ -54,7 +54,8 @@ namespace bgfx
IndexT* dst = (IndexT*)_dst;
IndexT* end = &dst[_dstSize/sizeof(IndexT)];
if (isEven(_numIndices) )
if (isEven(_numIndices)
&& dst < end)
{
*dst++ = _indices[_numIndices-1];
}