38 void GLUniformBuf::init()
42 glGenBuffers(1, &ubo_id_);
43 glBindBuffer(GL_UNIFORM_BUFFER, ubo_id_);
44 glBufferData(GL_UNIFORM_BUFFER,
size_in_bytes_,
nullptr, GL_DYNAMIC_DRAW);
54 glBindBuffer(GL_UNIFORM_BUFFER, ubo_id_);
56 glBindBuffer(GL_UNIFORM_BUFFER, 0);
69 "Error: Trying to bind \"%s\" ubo to slot %d which is above the reported limit of %d.",
80 if (
data_ !=
nullptr) {
86 glBindBufferBase(GL_UNIFORM_BUFFER, slot_, ubo_id_);
98 glBindBufferBase(GL_UNIFORM_BUFFER, slot_, 0);
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static void buf_free(GLuint buf_id)
static GLint max_ubo_binds
static GLint max_ubo_size
void object_label(GLenum type, GLuint object, const char *name)