hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rendering/texture.h')
-rw-r--r--src/rendering/texture.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/rendering/texture.h b/src/rendering/texture.h
new file mode 100644
index 0000000..e3c53f8
--- /dev/null
+++ b/src/rendering/texture.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include <memory>
+#include <string>
+#include <glm/glm.hpp>
+
+namespace Donut
+{
+ class Texture
+ {
+ public:
+ virtual ~Texture() = default;
+
+ virtual uint32_t get_width() const = 0;
+ virtual uint32_t get_height() const = 0;
+ virtual uint32_t get_renderer_id() const = 0;
+
+ virtual void set_data(void* data, uint32_t size) = 0;
+ virtual void bind(uint32_t slot = 0) const = 0;
+
+ virtual bool operator==(const Texture& other) const = 0;
+ };
+
+ class Texture2D : public Texture
+ {
+ public:
+ static std::shared_ptr<Texture2D> create(uint32_t width, uint32_t height);
+ static std::shared_ptr<Texture2D> create(const std::string& path);
+ };
+};