text: #include "VertexBuffer.h"
  
  #include "../errors/ErrorHandler.h"
  
  VertexBuffer::VertexBuffer(const void* data, unsigned int size) {
  	GLCall(glGenBuffers(1, &m_ID));
  	bind();
  	GLCall(glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW));
  	unbind();
  }
  
  VertexBuffer::~VertexBuffer() {
  	GLCall(glDeleteBuffers(1, &m_ID));
  }
  
  void VertexBuffer::bind() const {
  	GLCall(glBindBuffer(GL_ARRAY_BUFFER, m_ID));
  }
  
  void VertexBuffer::unbind() const {
  	GLCall(glBindBuffer(GL_ARRAY_BUFFER, 0));
  }
  