27 const bool allocate_on_device = ibo_id_ == 0;
28 if (allocate_on_device) {
29 glGenBuffers(1, &ibo_id_);
32 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_id_);
34 if (
data_ !=
nullptr || allocate_on_device) {
39 if (
data_ !=
nullptr) {
41 glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0,
size,
data_);
uint16_t bound_ssbo_slots
static void buffer_free(GLuint buf_id)