diff options
Diffstat (limited to 'src/Platform/OpenGL/OpenGLIndexBuffer.cpp')
| -rw-r--r-- | src/Platform/OpenGL/OpenGLIndexBuffer.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/Platform/OpenGL/OpenGLIndexBuffer.cpp b/src/Platform/OpenGL/OpenGLIndexBuffer.cpp deleted file mode 100644 index 668a898..0000000 --- a/src/Platform/OpenGL/OpenGLIndexBuffer.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "OpenGLIndexBuffer.h" -#include <glad/glad.h> - -namespace Donut -{ - OpenGLIndexBuffer::OpenGLIndexBuffer(const uint32_t* indices, uint32_t count) - : m_Count(count) - { - glGenBuffers(1, &m_RendererID); // glCreateBuffers is 4.5 DSA; unavailable on macOS 4.1 - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_RendererID); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, count * sizeof(uint32_t), indices, GL_STATIC_DRAW); - } - - OpenGLIndexBuffer::~OpenGLIndexBuffer() - { - glDeleteBuffers(1, &m_RendererID); - } - - void OpenGLIndexBuffer::Bind() const - { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_RendererID); - } - - void OpenGLIndexBuffer::Unbind() const - { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } -}; |
