diff options
Diffstat (limited to 'src/Rendering/Shader.h')
| -rw-r--r-- | src/Rendering/Shader.h | 15 |
1 files changed, 8 insertions, 7 deletions
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 <string> #include <unordered_map> -#include <memory> #include <glm/glm.hpp> #define SHADER_STORAGE_BARRIER_BIT 0x00002000 @@ -42,15 +43,15 @@ namespace Donut class ShaderLibrary { public: - void Add(const std::shared_ptr<Shader>& shader); - void Add(const std::string& name, const std::shared_ptr<Shader>& shader); - std::shared_ptr<Shader> Load(const std::string& filepath); - std::shared_ptr<Shader> Load(const std::string& name, const std::string& filepath); + void Add(const Ref<Shader>& shader); + void Add(const std::string& name, const Ref<Shader>& shader); + Ref<Shader> Load(const std::string& filepath); + Ref<Shader> Load(const std::string& name, const std::string& filepath); - std::shared_ptr<Shader> Get(const std::string& name); + Ref<Shader> Get(const std::string& name); bool Exists(const std::string& name) const; private: - std::unordered_map<std::string, std::shared_ptr<Shader>> m_Shaders; + std::unordered_map<std::string, Ref<Shader>> m_Shaders; }; }; |
