58 void GLUniformBuf::init()
62 glGenBuffers(1, &ubo_id_);
63 glBindBuffer(GL_UNIFORM_BUFFER, ubo_id_);
64 glBufferData(GL_UNIFORM_BUFFER,
size_in_bytes_,
nullptr, GL_DYNAMIC_DRAW);
74 glBindBuffer(GL_UNIFORM_BUFFER, ubo_id_);
76 glBindBuffer(GL_UNIFORM_BUFFER, 0);
89 "Error: Trying to bind \"%s\" ubo to slot %d which is above the reported limit of %d.",
100 if (
data_ !=
nullptr) {
106 glBindBufferBase(GL_UNIFORM_BUFFER, slot_, ubo_id_);
118 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)