Add progress callback when loading gltf

This commit is contained in:
Guillaume Meunier
2025-10-25 10:30:29 +02:00
parent 1e03b6e672
commit 7d76367d2c
2 changed files with 17 additions and 7 deletions
+3 -2
View File
@@ -20,6 +20,7 @@
#include <entt/core/fwd.hpp>
#include <filesystem>
#include <functional>
#include <vulkan/vulkan_raii.hpp>
#include "scene_components.h"
@@ -43,6 +44,6 @@ public:
{}
scene_loader(const scene_loader &) = default;
std::shared_ptr<entt::registry> operator()(const std::filesystem::path & gltf_path);
std::shared_ptr<entt::registry> operator()(std::span<const std::byte> data, const std::string & name = "", const std::filesystem::path & parent_path = "");
std::shared_ptr<entt::registry> operator()(const std::filesystem::path & gltf_path, std::function<void(float)> progress_cb = {});
std::shared_ptr<entt::registry> operator()(std::span<const std::byte> data, const std::string & name = "", const std::filesystem::path & parent_path = "", std::function<void(float)> progress_cb = {});
};