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

Invalid gltf file with EXT_mesh_gpu_instancing #226

Closed Lumengine closed 1 year ago

Lumengine commented 1 year ago

Hi ! I'm trying to load gltf file with the extension EXT_mesh_gpu_instancing, I took this one https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/SimpleInstancing but it return an invalid gltf. I looked at the code and it seems that this line CGLTF_PTRFIXUP_REQ(data->nodes[i].mesh_gpu_instancing.buffer_view, data->buffer_views, data->buffer_views_count); return an error as the buffer view is null.

Any idea if it's a bug or I'm doing something wrong ?

Thank you.

zeux commented 1 year ago

This bug was fixed by https://github.com/jkuhlmann/cgltf/commit/d36646f11e4a3e8ea398db20ee4ea4cfc0e1e0ec

If you’re using the latest numbered version then you won’t have the fix yet. Might be worth making a new release as the last one was almost a year ago? @jkuhlmann

Lumengine commented 1 year ago

Ah my bad ! I am using the latest release yes, so I don't have the fix. I looked at the opened and closed issues with instancing as keyword and didn't find anything relevant. I should have looked at the PR maybe. Anyway, Thank you !