aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/OpenGL/OpenGLIndexBuffer.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-12 18:12:37 +0200
committerhachem <im@hachem.wtf>2025-08-12 18:12:37 +0200
commita2ec7dabd48a70ea69623406ddd0f8f97af403c8 (patch)
tree52d71b51753b88473607f5e97f8bc15bdb5ad7d3 /src/Platform/OpenGL/OpenGLIndexBuffer.h
parent16dff443789c7f1461b46ce52966972ae14c042b (diff)
[add]: Start of a basic rendering backend
Diffstat (limited to 'src/Platform/OpenGL/OpenGLIndexBuffer.h')
-rw-r--r--src/Platform/OpenGL/OpenGLIndexBuffer.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Platform/OpenGL/OpenGLIndexBuffer.h b/src/Platform/OpenGL/OpenGLIndexBuffer.h
new file mode 100644
index 0000000..0de8fb2
--- /dev/null
+++ b/src/Platform/OpenGL/OpenGLIndexBuffer.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "Rendering/IndexBuffer.h"
+
+namespace Donut
+{
+ class OpenGLIndexBuffer
+ : public IndexBuffer
+ {
+ public:
+ OpenGLIndexBuffer(const uint32_t* indices, uint32_t count);
+ virtual ~OpenGLIndexBuffer();
+
+ virtual void Bind() const override;
+ virtual void Unbind() const override;
+ virtual uint32_t GetCount() const override { return m_Count; }
+
+ private:
+ uint32_t m_RendererID;
+ uint32_t m_Count;
+ };
+};