Skip to content

Commit f1ad9a7

Browse files
committed
added in vertex start positions to address gltf file with mixed indicies/no indicies primitives
1 parent 719dd6d commit f1ad9a7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

AssetLoader/interface/GLTFBuilder.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ Mesh* ModelBuilder::LoadMesh(const GltfModelType& GltfModel,
461461
IndexStart,
462462
IndexCount,
463463
VertexCount,
464+
VertexStart,
464465
static_cast<Uint32>(MaterialId),
465466
PosMin,
466467
PosMax //

AssetLoader/interface/GLTFLoader.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,19 +410,22 @@ struct Primitive
410410
const Uint32 FirstIndex;
411411
const Uint32 IndexCount;
412412
const Uint32 VertexCount;
413+
const Uint32 VertexStart;
413414
const Uint32 MaterialId;
414415

415416
const BoundBox BB;
416417

417418
Primitive(Uint32 _FirstIndex,
418419
Uint32 _IndexCount,
419420
Uint32 _VertexCount,
421+
Uint32 _VertexStart,
420422
Uint32 _MaterialId,
421423
const float3& _BBMin,
422424
const float3& _BBMax) :
423425
FirstIndex{_FirstIndex},
424426
IndexCount{_IndexCount},
425427
VertexCount{_VertexCount},
428+
VertexStart{_VertexStart},
426429
MaterialId{_MaterialId},
427430
BB{_BBMin, _BBMax}
428431
{

0 commit comments

Comments
 (0)