ferx/engine/rendering/VertexArray.cpp
2024-11-22 04:35:43 +04:00

32 lines
406 B
C++

#include "VertexArray.h"
VertexArray::VertexArray()
{
glGenVertexArrays(1, &m_VAO);
}
VertexArray::~VertexArray()
{
Shutdown();
}
VertexArray VertexArray::Create()
{
return VertexArray{};
}
void VertexArray::Bind() const
{
glBindVertexArray(m_VAO);
}
void VertexArray::Unbind()
{
glBindVertexArray(0);
}
void VertexArray::Shutdown() const
{
glDeleteVertexArrays(1, &m_VAO);
}