Buffer bindings of transform feedback objects
<p>using OpenGL 4.5 and an NVidia card, I have noticed that when switching transform feedback objects via <code>glBindTransformFeedback()</code>, the associated array buffer bindings established with <code>glBindBufferBase()</code>, do not get changed.</p>

<p>Have a look at the following snippets:</p>

<p>Let there be a pair of transform feedback and vertex buffer objects:</p>

<pre><code>GLuint tfo1, vbo1;
glGenTransformFeedbacks(1, &amp;tfo1);
glGenBuffers(1, &amp;vbo1);
glBindBuffer(GL_ARRAY_BUFFER, vbo1);
glBufferData(GL_ARRAY_BUFFER, 123 * sizeof(float), nullptr, GL_DYNAMIC_DRAW);

glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, tfo1);
glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, vbo1);
</code></pre>

<p>Query result using <code>glGetIntegerv()</code>:</p>

<pre><code>GL_TRANSFORM_FEEDBACK_BINDING: 1
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: 1
</code></pre>

<p>Let there be another pair of such objects:</p>

<pre><code>GLuint tfo2, vbo2;
glGenTransformFeedbacks(1, &amp;tfo2);
glGenBuffers(1, &amp;vbo2);
glBindBuffer(GL_ARRAY_BUFFER, vbo2);
glBufferData(GL_ARRAY_BUFFER, 123 * sizeof(float), nullptr, GL_DYNAMIC_DRAW);

glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, tfo2);
glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, vbo2);
</code></pre>

<p>Query result using <code>glGetIntegerv()</code>:</p>

<pre><code>GL_TRANSFORM_FEEDBACK_BINDING: 2
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: 2
</code></pre>

<p>And now comes the issue: After having created the second pair, binding the previous transform buffer object <code>tfo1</code>...</p>

<pre><code>glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, tfo1);
</code></pre>

<p>...leads to the following query result:</p>

<pre><code>GL_TRANSFORM_FEEDBACK_BINDING: 1
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: 2   &lt;--- WHY NOT 1?
</code></pre>

<p>The bound TFO is now <code>tfo1</code> but the array buffer binding has not been changed.
<strong>It looks like as if the buffer binding is not part of the TFO state but can that be?</strong> Isn't managing buffer bindings the main reason TFOs exist?</p>