aboutsummaryrefslogtreecommitdiff
path: root/src/Rendering/Texture.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-12 19:17:50 +0200
committerhachem <im@hachem.wtf>2025-08-12 19:17:50 +0200
commit1ad6bc34323f5b30d463ebe47a58d47ff9d4f328 (patch)
tree535774e6db8e03fdb204c27734ca9fa43ab30a61 /src/Rendering/Texture.h
parent8cf6858a6cd958f31521c4ce680cf2011bfb7cc3 (diff)
[add]: Texture and Pixel buffers
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..eebce85
--- /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 GetWidth() const = 0;
+ virtual uint32_t GetHeight() const = 0;
+ virtual uint32_t GetRendererID() const = 0;
+
+ virtual void SetData(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);
+ };
+}; \ No newline at end of file