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.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Rendering/Shader.cpp') diff --git a/src/Rendering/Shader.cpp b/src/Rendering/Shader.cpp index e38ce65..8266e00 100644 --- a/src/Rendering/Shader.cpp +++ b/src/Rendering/Shader.cpp @@ -1,8 +1,8 @@ #include "Shader.h" #include "Renderer.h" + #include "Platform/OpenGL/OpenGLShader.h" #include "Platform/Vulkan/VulkanShader.h" -#include namespace Donut { @@ -45,32 +45,32 @@ namespace Donut } } - void ShaderLibrary::Add(const std::shared_ptr& shader) + void ShaderLibrary::Add(const Ref& shader) { auto& name = shader->GetName(); Add(name, shader); } - void ShaderLibrary::Add(const std::string& name, const std::shared_ptr& shader) + void ShaderLibrary::Add(const std::string& name, const Ref& shader) { m_Shaders[name] = shader; } - std::shared_ptr ShaderLibrary::Load(const std::string& filepath) + Ref ShaderLibrary::Load(const std::string& filepath) { - auto shader = std::shared_ptr(Shader::Create(filepath)); + auto shader = Ref(Shader::Create(filepath)); Add(shader); return shader; } - std::shared_ptr ShaderLibrary::Load(const std::string& name, const std::string& filepath) + Ref ShaderLibrary::Load(const std::string& name, const std::string& filepath) { - auto shader = std::shared_ptr(Shader::Create(filepath)); + auto shader = Ref(Shader::Create(filepath)); Add(name, shader); return shader; } - std::shared_ptr ShaderLibrary::Get(const std::string& name) + Ref ShaderLibrary::Get(const std::string& name) { if (Exists(name)) return m_Shaders[name]; -- cgit v1.3