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 <NazaraUtils/FunctionRef.hpp>
#include <NazaraUtils/Result.hpp>
#include <functional>
#include <memory>
namespace Nz
{
struct NAZARA_GRAPHICS_API ModelParams : ResourceParameters
{
bool loadMaterials = true;
FunctionRef<Result<void, ResourceLoadingError>(const std::shared_ptr<Mesh>& mesh)> meshCallback = nullptr;
std::function<Result<void, ResourceLoadingError>(const std::shared_ptr<Mesh>& mesh)> meshCallback = {};
MeshParams mesh;
bool loadMaterials = true;
bool IsValid() const;
};