title: Retrieving properties of shader storage buffer
body: <p>I want to retrieve some properties of a shader storage buffer:</p>
  
  <pre><code>struct A{
     float x;
     float y;
     vec4  v;
  };
  
  struct B{
      vec3 u;
  };
  
  layout(std430) buffer foo{
     B b;
     A a[];
  };
  </code></pre>
  
  <p>Let's suppose the buffer is active. Retrieving the size of the buffer via glGetProgramResourceiv() works and yields 48 machine units. But retrieving the offset of the buffer variables and the array stride of "a" doesn't work. </p>
  
  <pre><code>const GLenum props[] = {GL_OFFSET};
  GLint* offset = new GLint;
  GLuint varIndex = glGetProgramResourceIndex(_progID, GL_BUFFER_VARIABLE, "b");
  glGetProgramResourceiv(_progID, GL_BUFFER_VARIABLE, varIndex, 1, props, 1, NULL, offset);
  </code></pre>
  
  <p>The varIndex is always "GL_INVALID_INDEX". How do I get the offsets for all the buffer variables?</p>