Files
eiifwhrn-game-engine-edition/VAO.cpp
T
2026-06-08 17:07:34 -04:00

31 lines
451 B
C++

#include "VAO.h"
VAO::VAO()
{
}
void VAO::LinkVBO(VBO& vbo, GLuint layout, GLuint numComponents, GLenum type, GLsizeiptr stride, void* offset) {
vbo.Bind();
glEnableVertexAttribArray(layout);
glVertexAttribPointer(layout, numComponents, type, GL_FALSE, stride, offset);
vbo.Unbind();
}
void VAO::Bind()
{
glBindVertexArray(ID);
}
void VAO::Unbind()
{
glBindVertexArray(0);
}
void VAO::Delete()
{
glDeleteVertexArrays(1, &ID);
ID = 0;
}