42 buffer(GLenum input_target);
50 this->target = other.target;
56 this->target = other.target;
63 void init(GLenum input_target);
75 void set_id(
unsigned int id);
76 void set_target(GLenum
target);
87 void copy_data(GLsizeiptr size,
const void *data, GLenum usage);
98 void copy_vertices(GLsizeiptr size,
const void *data, GLenum usage);
108 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 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.
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...)