added the readme
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
|
||||
#include "VBO.h"
|
||||
|
||||
VBO::VBO()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void VBO::Bind()
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, ID);
|
||||
}
|
||||
|
||||
void VBO::BufferData(void* vertices, GLsizeiptr size) {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, ID);
|
||||
glBufferData(GL_ARRAY_BUFFER, size, vertices, GL_STATIC_DRAW);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
void VBO::Unbind()
|
||||
{
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
void VBO::Delete()
|
||||
{
|
||||
glDeleteBuffers(1, &ID);
|
||||
ID = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user