diff options
author | Giancarlo Dessi <slack@giand.it> | 2023-11-12 09:50:28 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-11-12 12:54:13 +0700 |
commit | 8a225ddfed9e9004d9f95c4c3b4a91c032166582 (patch) | |
tree | 416b87b00d860064bd4543d4d8ea910b33c0ebd5 /libraries/libdraco/gltf_decoder_cc.patch | |
parent | 493b28cbb13694be90077d4b027a44d95727731e (diff) | |
download | slackbuilds-8a225ddfed9e9004d9f95c4c3b4a91c032166582.tar.gz slackbuilds-8a225ddfed9e9004d9f95c4c3b4a91c032166582.tar.xz |
libraries/libdraco: Added (3D data compression).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libdraco/gltf_decoder_cc.patch')
-rw-r--r-- | libraries/libdraco/gltf_decoder_cc.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libraries/libdraco/gltf_decoder_cc.patch b/libraries/libdraco/gltf_decoder_cc.patch new file mode 100644 index 0000000000..a2874df390 --- /dev/null +++ b/libraries/libdraco/gltf_decoder_cc.patch @@ -0,0 +1,23 @@ +--- ./src/draco/io/gltf_decoder.cc ++++ ./src/draco/io/gltf_decoder.cc +@@ -427,6 +427,12 @@ + return WriteBufferToFile(contents.data(), contents.size(), filepath); + } + ++bool GetFileSizeInBytes(size_t *out, std::string * /*err*/, ++ const std::string &filepath, void * /*user_data*/) { ++ *out = GetFileSize(filepath); ++ return true; ++} ++ + } // namespace + + GltfDecoder::GltfDecoder() +@@ -486,6 +492,7 @@ + // TinyGLTF's ExpandFilePath does not do filesystem i/o, so it's safe to + // use in all environments. + &tinygltf::ExpandFilePath, &ReadWholeFile, &WriteWholeFile, ++ &GetFileSizeInBytes, + reinterpret_cast<void *>(input_files)}; + + loader.SetFsCallbacks(fs_callbacks); |