78 buffer(GLenum input_target);
114 void set_id(
unsigned int id);
133 void copy_data(GLsizeiptr size,
const void *data, GLenum usage);
143 void copy_vertices(GLsizeiptr size,
const void *data, GLenum usage);
152 void copy_indices(GLsizeiptr size,
const void *data, GLenum usage);
Buffer wrapper around OpenGL buffer objects.
void copy_indices(GLsizeiptr size, const void *data, GLenum usage)
Copy data to the buffer object.
void unbind()
Unbind the buffer object.
void set_target(GLenum target)
Set the buffer object target.
void destroy()
Delete the buffer object.
void set_id(unsigned int id)
Set the buffer object id.
void copy_vertices(GLsizeiptr size, const void *data, GLenum usage)
Copy data to the buffer object.
void copy_data(GLsizeiptr size, const void *data, GLenum usage)
Copy data to the buffer object.
GLenum get_target()
Get the buffer object target.
buffer()
Default constructor, does nothing.
unsigned int id
Buffer object id, generated by OpenGL.
GLenum target
Buffer object target (like GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER...)
int get_id()
Get the buffer object id.
void bind()
Bind the buffer object.