jkuhlmann / cgltf

:diamond_shape_with_a_dot_inside: Single-file glTF 2.0 loader and writer written in C99
MIT License
1.42k stars 135 forks source link

Fix support for EXT_mesh_gpu_instancing #216

Closed zeux closed 1 year ago

zeux commented 1 year ago

bufferView is not a valid attribute; it looks like the code was probably copied from Draco where this attribute is valid. See schema: https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/schema/glTF.EXT_mesh_gpu_instancing.schema.json

Also we were missing skip_json for both this extension and Draco; this can be necessary to skip extras data.

Without this change, cgltf can't load SimpleInstancing.gltf from glTF-Sample-Models (recently added)