Open footballhead opened 5 months ago
There's evidence that this is partly implemented but incomplete. In GltfLoader::LoadMeshData (scene_gltf_loader.cpp):
GetFormat()
can return FORMAT_UNDEFINED
when indices are missing (pGltfPrimitive->indices == nullptr
). There's a comment that says: "It's valid for this to be UNDEFINED, means the primitive doesn't have any index data."genTopologyIndices
. This is set to true
when indexFormat == grfx::FORMAT_UNDEFINED
. This factors into code that populates targetGeometry
.However, there's also an independent check for IsNull() very early on when BatchInfo
s are being made:
// We require index data so bail if there isn't index data.
if (IsNull(pGltfPrimitive->indices)) {
PPX_ASSERT_MSG(false, "GLTF mesh primitive does not have index data");
return ppx::ERROR_SCENE_INVALID_SOURCE_GEOMETRY_INDEX_DATA;
}
Additionally, none of the staging/target buffer sizing code considers the case where indexFormat == grfx::FORMAT_UNDEFINED
GltfLoader::LoadMeshData
currently complains when a mesh lacksindices
. However, meshes are allowed to not haveindices
. 5.24.2 says:This would allow BigWheels to load and render: