Closed Cyphall closed 8 months ago
Can you be more specific about the meaning of "does not work"? Does the writeGltfBinary
function return any error, or are there any specific side effects that you didn't want to happen? Or did the current code just export the GLB buffer as a normal buffer to a extra file instead of embedding it into the GLB file?
I have changed the code locally, and will push if that was your only concern. Thank you.
Sorry, I should have been a bit more explicit on my issue.
When exporting as glb an asset with one buffer (small or large, doesn't matter) whose data field is an fastgltf::sources::ByteView
, the buffer is created in a separate file instead of being embedded in the glb file
Okay, so what I thought. That is fixed now in the latest commit. Thanks again for reporting.
Seems to be caused by the
sources::ByteView
case missing the if statement present insources::Array
andsources::Vector
: https://github.com/spnda/fastgltf/blob/f8ed5a09e761dab002c143735c3643323435fac4/src/fastgltf.cpp#L4189-L4211