jkuhlmann / cgltf

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

cgltf_write accessor is missing stride property #191

Closed pplux closed 1 year ago

pplux commented 1 year ago

In this function:

https://github.com/jkuhlmann/cgltf/blob/561455ec216fa30d546854a2cb8c89b830b7b949/cgltf_write.h#L1020:L1059

accessor.stride is not serialized.

jkuhlmann commented 1 year ago

This is because it is not a property of accessor. See here: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-accessor It's only there for convenience as it's either a copy of the bufferView's stride or it's calculated for you.