diff options
author | fschildt <florian.schildt@protonmail.com> | 2025-07-21 16:07:28 +0200 |
---|---|---|
committer | fschildt <florian.schildt@protonmail.com> | 2025-07-21 16:07:28 +0200 |
commit | b46a0d9369fbaa1938f0968ab216bc2d564a9c37 (patch) | |
tree | c28b75187d01be9642af56a54a6101f51b25e4a7 /src/renderer/opengl/GlIndexBuffer.hpp |
Diffstat (limited to 'src/renderer/opengl/GlIndexBuffer.hpp')
-rw-r--r-- | src/renderer/opengl/GlIndexBuffer.hpp | 23 |
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; +}; + |