aboutsummaryrefslogtreecommitdiff
path: root/src/renderer/opengl/GlIndexBuffer.hpp
diff options
context:
space:
mode:
authorfschildt <florian.schildt@protonmail.com>2025-07-21 16:07:28 +0200
committerfschildt <florian.schildt@protonmail.com>2025-07-21 16:07:28 +0200
commitb46a0d9369fbaa1938f0968ab216bc2d564a9c37 (patch)
treec28b75187d01be9642af56a54a6101f51b25e4a7 /src/renderer/opengl/GlIndexBuffer.hpp
first commitHEADmaster
Diffstat (limited to 'src/renderer/opengl/GlIndexBuffer.hpp')
-rw-r--r--src/renderer/opengl/GlIndexBuffer.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/renderer/opengl/GlIndexBuffer.hpp b/src/renderer/opengl/GlIndexBuffer.hpp
new file mode 100644
index 0000000..7805460
--- /dev/null
+++ b/src/renderer/opengl/GlIndexBuffer.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <renderer/Renderer.hpp>
+
+class GlIndexBuffer {
+public:
+ GlIndexBuffer() = default;
+ void Init();
+ void Reset();
+
+public:
+ uint32_t GetCount();
+ uint32_t *GetData();
+
+ void PushRectangle();
+ void TransferData();
+
+private:
+ uint32_t m_Id;
+ uint32_t m_CurrentIndex;
+ std::vector<uint32_t> m_Indices;
+};
+