I have been using this cgltf_load_buffer_base64 to decode images from Khronos glTF samples repo. Images in some of the embedded glTF files like DamagedHelmet and TextureCoordinateTest can't be decoded using cgltf_load_buffer_base64.
At this point I am not sure if its actually cgltf_load_buffer_base64 that doesn't know this specific encoding or gltfviewer doing some magic that makes it work. I thought I should ask perhaps you know more.
Never mind apologies this has been a dumb driver issue. I wasn't calculating the size correctly. https://www.base64decode.org put me off though, it doesn't take size it calculates it itself...
I have been using this
cgltf_load_buffer_base64
to decode images from Khronos glTF samples repo. Images in some of the embedded glTF files like DamagedHelmet and TextureCoordinateTest can't be decoded usingcgltf_load_buffer_base64
.Surprisingly If I just copy past the base64 data from the glTF file into https://www.base64decode.org it also complains but then https://gltf-viewer.donmccurdy.com happily accepts the file and loads the models correctly.
At this point I am not sure if its actually
cgltf_load_buffer_base64
that doesn't know this specific encoding or gltfviewer doing some magic that makes it work. I thought I should ask perhaps you know more.