spnda / fastgltf

A modern C++17 glTF 2.0 library focused on speed, correctness, and usability
https://fastgltf.readthedocs.io/v0.8.x/
MIT License
275 stars 42 forks source link

Wrong field name for primitive topology when exporting #54

Closed Cyphall closed 6 months ago

Cyphall commented 6 months ago

When exporting a glTF file, the topology of primitives is exported in a field called "type": https://github.com/spnda/fastgltf/blob/753b1610fe161963ba7242b65b744d7927b11303/src/fastgltf.cpp#L4939-L4941

But the specs say that this field should be called "mode".

spnda commented 6 months ago

First of all, thank you for all of the issues you've found over the past few days and sorry that you had to face them.

For the future, in these cases where the fix is obvious and/or trivial perhaps you could open a pull request directly? I am often at school where I have no way of committing and/or testing changes, and you've always found a correct solution for the issue which you mentioned in the issue. I'd be happy to review and merge those.

Cyphall commented 6 months ago

First of all, thank you for all of the issues you've found over the past few days and sorry that you had to face them.

It's normal, export is a fairly new feature and you don't have the resources a company would have to fully test it before release :smiley:

For the future, in these cases where the fix is obvious and/or trivial perhaps you could open a pull request directly?

Sure!