Let's say I have two uniform blocks defined in my shader, call them A and B.
In my program code I generate the name and create data store for each one using
something like:
glGenBuffers(1, &buffer);
glBindBuffer(GL_UNIFORM_BUFFER, buffer);
glBufferData(GL_UNIFORM_BUFFER, bufferSize, nullptr, GL_STATIC_DRAW);
I then bind each one with: glBindBufferBase(GL_UNIFORM_BUFFER, bindingPoint, buffer);
and set the block bindings in shader: glUniformBlockBinding(handle, UBOindex, bindingPoint);
Now it's time to update the buffer data. I call glBufferSubData(GL_UNIFORM_BUFFER, offset, size, data).
Since two UBOs are bound and the above call does not accept binding point I have
no idea what will happen. Can anyone help?