title: "GL_INVALID_VALUE error generated." by binding just one Uniform Block
body: <p>I have some problems with the binding of an uniform buffer object to several shaders.</p>
  
  <p>The execution of the following code:</p>
  
  <pre><code>for(auto&amp; shaderIter : shaderHandler.getShaderPrograms()){
      shaderIter.second-&gt;bind();
      GLuint programID = shaderIter.second-&gt;programId();
      GLuint index = glFuncs-&gt;glGetUniformBlockIndex(programID, "MatrixUBO");
      glFuncs-&gt;glUniformBlockBinding(programID, index, UBO_MATRICES_BINDING_POINT);
      shaderIter.second-&gt;release();
  }
  </code></pre>
  
  <p>causes the error message</p>
  
  <pre><code>QOpenGLDebugMessage("APISource", 1281, "GL_INVALID_VALUE error generated. Uniform block index exceeds the maximum supported uniform buffers.", "HighSeverity", "ErrorType")
  </code></pre>
  
  <p>The type of the shader programs is QOpenGLShaderProgram. I use vertex, geometry, fragment and compute shaders with these shader programs.</p>
  
  <p>The value of <code>GL_MAX_{VERTEX, FRAGMENT, GEOMETRY}_UNIFORM_BLOCKS</code> is 14. The output of <code>index</code> is for each program 0 except for one where it is 4294967295.</p>