2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-06 08:42:35 +00:00

Moved the re-ordering of indices to the BSP creator instead of the BSP asset linker.

This commit is contained in:
LJW-Dev
2025-11-04 18:32:29 +08:00
committed by Jan Laupetin
parent 80fd8340fb
commit 2f07a70448
3 changed files with 10 additions and 17 deletions
@@ -44,12 +44,9 @@ namespace BSP
assert(indexCount % 3 == 0);
gfxWorld->draw.indexCount = static_cast<int>(indexCount);
gfxWorld->draw.indices = m_memory.Alloc<uint16_t>(indexCount);
for (size_t indexIdx = 0; indexIdx < indexCount; indexIdx += 3)
for (size_t indexIdx = 0; indexIdx < indexCount; indexIdx++)
{
// the editor orders their vertices opposite to bo2, so its converted here
gfxWorld->draw.indices[indexIdx + 2] = bsp->gfxWorld.indices.at(indexIdx + 0);
gfxWorld->draw.indices[indexIdx + 1] = bsp->gfxWorld.indices.at(indexIdx + 1);
gfxWorld->draw.indices[indexIdx + 0] = bsp->gfxWorld.indices.at(indexIdx + 2);
gfxWorld->draw.indices[indexIdx] = bsp->gfxWorld.indices.at(indexIdx);
}
}