hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/platform/opengl/opengl_index_buffer.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-20 22:05:09 +0200
committerhachem <im@hachem.wtf>2026-08-20 22:05:09 +0200
commit0f49e8fd2a364f91f0a4c3bc2210fac4d9bf2ecc (patch)
tree8afb5564714fec75b19dbe3b7a42df2cfbee34c5 /src/platform/opengl/opengl_index_buffer.cpp
parent85b63b3b61174a99811f3cba235da4537634edd4 (diff)
refactor: fold the OpenGL backend classes into rendering
Diffstat (limited to 'src/platform/opengl/opengl_index_buffer.cpp')
-rw-r--r--src/platform/opengl/opengl_index_buffer.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/platform/opengl/opengl_index_buffer.cpp b/src/platform/opengl/opengl_index_buffer.cpp
deleted file mode 100644
index 60b710d..0000000
--- a/src/platform/opengl/opengl_index_buffer.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "opengl_index_buffer.h"
-#include <glad/glad.h>
-
-namespace Donut
-{
- OpenGLIndexBuffer::OpenGLIndexBuffer(const uint32_t* indices, uint32_t count)
- : m_count(count)
- {
- glGenBuffers(1, &m_renderer_id);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_renderer_id);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, count * sizeof(uint32_t), indices, GL_STATIC_DRAW);
- }
-
- OpenGLIndexBuffer::~OpenGLIndexBuffer()
- {
- glDeleteBuffers(1, &m_renderer_id);
- }
-
- auto OpenGLIndexBuffer::bind() const -> void
- {
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_renderer_id);
- }
-
- auto OpenGLIndexBuffer::unbind() const -> void
- {
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- }
-};