mirror of
https://github.com/leozide/leocad
synced 2025-01-30 20:34:56 +01:00
Merge pull request #657 from j6t/fix-indextype-in-meshloader
Fix check for type of mesh index.
This commit is contained in:
commit
2f664f5a1c
1 changed files with 2 additions and 2 deletions
|
@ -1123,7 +1123,7 @@ lcMesh* lcLibraryMeshData::CreateMesh()
|
|||
if (DstSection.Texture)
|
||||
DstSection.Texture->AddRef();
|
||||
|
||||
if (Mesh->mNumVertices < 0x10000)
|
||||
if (Mesh->mIndexType == GL_UNSIGNED_SHORT)
|
||||
{
|
||||
DstSection.IndexOffset = NumIndices * 2;
|
||||
|
||||
|
@ -1294,7 +1294,7 @@ void lcLibraryMeshData::UpdateMeshBoundingBox(lcMesh* Mesh)
|
|||
lcMeshSection& Section = Lod.Sections[SectionIdx];
|
||||
lcVector3 SectionMin(FLT_MAX, FLT_MAX, FLT_MAX), SectionMax(-FLT_MAX, -FLT_MAX, -FLT_MAX);
|
||||
|
||||
if (Mesh->mNumVertices < 0x10000)
|
||||
if (Mesh->mIndexType == GL_UNSIGNED_SHORT)
|
||||
UpdateMeshSectionBoundingBox<quint16>(Mesh, Section, SectionMin, SectionMax);
|
||||
else
|
||||
UpdateMeshSectionBoundingBox<quint32>(Mesh, Section, SectionMin, SectionMax);
|
||||
|
|
Loading…
Add table
Reference in a new issue