jkuhlmann / cgltf

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

write buffer_view should write TARGET #193

Open pplux opened 1 year ago

pplux commented 1 year ago

The function

https://github.com/jkuhlmann/cgltf/blob/561455ec216fa30d546854a2cb8c89b830b7b949/cgltf_write.h#L559-L570

should (according to the spec) write the property target when the bufferview is used for attributes or indices:

When a buffer view is used by vertex indices or attribute accessors it SHOULD specify bufferView.target with a value of element array buffer or array buffer respectively.

This is just an enhancement, not an error :)