Graphics/Model: Switch meshCallback to std::function

This commit is contained in:
SirLynix 2024-02-22 20:15:47 +01:00
parent f71d149785
commit 1cb1750a74
1 changed files with 3 additions and 2 deletions

View File

@ -22,15 +22,16 @@
#include <Nazara/Renderer/RenderPipeline.hpp> #include <Nazara/Renderer/RenderPipeline.hpp>
#include <NazaraUtils/FunctionRef.hpp> #include <NazaraUtils/FunctionRef.hpp>
#include <NazaraUtils/Result.hpp> #include <NazaraUtils/Result.hpp>
#include <functional>
#include <memory> #include <memory>
namespace Nz namespace Nz
{ {
struct NAZARA_GRAPHICS_API ModelParams : ResourceParameters struct NAZARA_GRAPHICS_API ModelParams : ResourceParameters
{ {
bool loadMaterials = true; std::function<Result<void, ResourceLoadingError>(const std::shared_ptr<Mesh>& mesh)> meshCallback = {};
FunctionRef<Result<void, ResourceLoadingError>(const std::shared_ptr<Mesh>& mesh)> meshCallback = nullptr;
MeshParams mesh; MeshParams mesh;
bool loadMaterials = true;
bool IsValid() const; bool IsValid() const;
}; };