I'm trying to work with multiple uniform blocks in my shaders. I've read this page multiple times, but I'm confused about the difference between uniformBlockIndex and uniformBlockBinding. Say I have a shader with two uniform blocks. I'd want to call glGetUniformBlockIndex for each named uniform block to retrieve the uniformBlockIndex, and then call glUniformBlockBinding to specify the block index and block binding points.
The uniformBlockIndex makes sense to me as the location within the shader where the uniform block resides. But what is the purpose of uniformBlockBinding then? Right now I'm specifying that as the same number I got for uniformBlockIndex and everything works fine. Why would I use something different?