mirror of https://github.com/qt/qt3d.git
GLTFGeometryLoader: prevent early return on option bufferview target property
The glTF specs mention that the target property on a buffer view is not required: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-bufferview Therefore, since the parser would return early if no target was specified, preventing any mesh from being loaded. This patch removes the target checking which serves no purpose. Pick-to: 6.4 5.15 Change-Id: I7b1781060b79d1d102c1366dc1884a9f283a7f9f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
d8efe38791
commit
cffc59ff37
|
|
@ -306,15 +306,6 @@ void GLTFGeometryLoader::processJSONBufferViewV2(const QJsonObject &json)
|
|||
}
|
||||
const auto bufferData = m_gltf2.m_bufferDatas[bufferIndex];
|
||||
|
||||
int target = json.value(KEY_TARGET).toInt();
|
||||
switch (target) {
|
||||
case GL_ARRAY_BUFFER:
|
||||
case GL_ELEMENT_ARRAY_BUFFER:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
quint64 offset = 0;
|
||||
const auto byteOffset = json.value(KEY_BYTE_OFFSET);
|
||||
if (!byteOffset.isUndefined()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue