blob: 8d0e52e78fbba8d08629f5f78b5059c014c6183c (
plain) (
tree)
|
|
--- ./src/draco/io/gltf_decoder.cc
+++ ./src/draco/io/gltf_decoder.cc
@@ -438,6 +438,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()
@@ -497,6 +497,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);
|