added the readme
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user