aboutsummaryrefslogtreecommitdiff
path: root/src/platform/opengl/opengl_index_buffer.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-20 22:20:49 +0200
committerhachem <im@hachem.wtf>2026-08-20 22:20:49 +0200
commit45baf48db974c66cfdc51f26cee191abbbd89a0b (patch)
treeb60c27506f1e1c37b7238161156c83e7e159fc12 /src/platform/opengl/opengl_index_buffer.cpp
parent00bf9a8cce28ab1dbc77ba24428be12391c4a576 (diff)
[feat]: reduce renderer abstraction
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 faa6b81..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); // glCreateBuffers is 4.5 DSA; unavailable on macOS 4.1
- 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);
- }
-};