From 0d8b874c0048ca088bb9e353a5f7c62e1f8cd0e8 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 00:42:05 +0200 Subject: feat: custom memory managers and fix includes --- src/rendering/shader.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/rendering/shader.h') diff --git a/src/rendering/shader.h b/src/rendering/shader.h index f490f3c..814f0cf 100644 --- a/src/rendering/shader.h +++ b/src/rendering/shader.h @@ -1,8 +1,9 @@ #pragma once +#include "core/memory.h" + #include #include -#include #include #define SHADER_STORAGE_BARRIER_BIT 0x00002000 @@ -42,15 +43,15 @@ namespace Donut class ShaderLibrary { public: - void add(const std::shared_ptr& shader); - void add(const std::string& name, const std::shared_ptr& shader); - std::shared_ptr load(const std::string& filepath); - std::shared_ptr load(const std::string& name, const std::string& filepath); + void add(const Ref& shader); + void add(const std::string& name, const Ref& shader); + Ref load(const std::string& filepath); + Ref load(const std::string& name, const std::string& filepath); - std::shared_ptr get(const std::string& name); + Ref get(const std::string& name); bool exists(const std::string& name) const; private: - std::unordered_map> m_shaders; + std::unordered_map> m_shaders; }; }; -- cgit v1.3