In pre-DSA opengl, the way to specify a Vertex Array attribute format was something like this:
glBindVertexArray(VA);
glEnableVertexAttribArray(attribIndex);
glVertexAttribPointer(attribIndex, count, type, normalized, stride, pointer);
With DSA is something like:
glVertexArrayVertexBuffer(VA, bindingIndex, VB, offset, stride);
glEnableVertexArrayAttrib(VA, attribIndex);
glVertexArrayAttribFormat(VA, attribIndex, count, type, normalized, relOffset);
glVertexArrayAttribBinding(VA, attribIndex, bindingIndex);
My questions are:
- What is the bindingIndex and what role does it have?
- Why is glVertexArrayAttribFormat separated from glVertexArrayAttribBinding? Is there any advantage of doing this?
- What's its relation with, for instance, a Uniform Buffer binding point?