You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah when I wrote cgltf_write I figured I could use an external tool to convert to glb, so I made it low priority.
However I think this is a good feature request. The GLB exporter could re-use what we already did for JSON, and it would not incur any additional dependencies (e.g. no compression library is required).
I spent some time trying to use cgltf_writer.h, but found it was easier to just write my own JSON code. Knitting together the C structures that match JSON 1-to-1 was very tedious and ended up being more verbose.
Instead, I put together some GLB utility functions to handle the chunk writing and
determine the min/max vec3 bounds. There's a UNIT_TEST in glb.c which serves as an
example of how to use the glb_* functions.
This method of writing GLB files adds less than 4% of the code required by cgltf to a project, and can avoid the gltf_validator TARGET warning caused by issue #193.
When generating my own mesh, I'd like to save the result together with the meta data in a glb file. That is currently not possible with cgltf.
The text was updated successfully, but these errors were encountered: