hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rendering/shader.h')
-rw-r--r--src/rendering/shader.h15
1 files changed, 8 insertions, 7 deletions
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 <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;
};
};