24 lines
725 B
Diff
24 lines
725 B
Diff
--- ./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);
|