Closed Cyphall closed 8 months ago
I didn't have any time yesterday to tend to your issues, but I quickly tried and tested this.
Since buffer is const, buffer.data is also const, but none of the visitor handlers take a const value as parameter so they never get called.
If I remember correctly specifying them as const didn't fix the issue. Or did that work locally for you? Also, I'll have to figure out some tests that verify that the buffer was correctly written, as that isn't covered right now.
Or did that work locally for you?
Yes, I have added the missing const
qualifiers locally and it now work as expected.
When exporting an asset as GLB, the first buffer is correctly flagged as embedded and no .bin is created, but the content of said buffer is never actually written to the GLB file.
This is caused by missing
const
qualifiers in the parameter of the visitor handlers: https://github.com/spnda/fastgltf/blob/753b1610fe161963ba7242b65b744d7927b11303/src/fastgltf.cpp#L5515-L5539Since
buffer
isconst
,buffer.data
is alsoconst
, but none of the visitor handlers take aconst
value as parameter so they never get called. All cases are currently routed to the default handler[](auto arg) {}
.