From e050dce79b67ae6386240567a994454711ab998d Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 00:42:05 +0200 Subject: [add]: 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 ef0bdb1..e2d8d2a 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