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 primitive rendering mode in cgltf_write #244

Closed bowald closed 6 months ago

bowald commented 7 months ago

Adds a translation from cgltf_primitive_type to gltf primitive rendering mode in the writer.

This PR is a fix for the issue https://github.com/jkuhlmann/cgltf/issues/243.

The bug was introduced when cgltf_primitive_type was added in commit afe4d3aa29f47f45c21e563f500e49f4e10d6428 and resulted in rendering mode was offset by one in the written file.

Thanks for a great library!

zeux commented 6 months ago

Sorry about the regression, and thanks for the fix!