title: Pyglet, shaders and GLSL layout tag for color attribute
body: <p>I'm trying to use pyglet and OpenGL 4 style shaders (ie: not using any matrix operations, using (layout=...) etc...)</p>
  
  <p>I have a basic vertex shader which is:</p>
  
  <pre><code>#version 400
  
  uniform mat4 projectionMatrix;
  uniform mat4 modelviewMatrix;
  
  uniform vec2 offset;
  varying vec4 vertex_color;
  
  layout(location=0) in vec4 inVert;
  layout(location=1) in vec4 inColor;
  
  void main() {
      gl_Position = projectionMatrix * ( modelviewMatrix * ( inVert + vec4(offset.x, offset.y, 0, 0) ) );
      vertex_color = gl_Color;
  }
  </code></pre>
  
  <p>and a basic fragment shader:</p>
  
  <pre><code>#version 400
  
  varying vec4 vertex_color;
  out vec4 outColor;
  
  void main(){
      outColor = vertex_color;
  }
  </code></pre>
  
  <p>I use</p>
  
  <pre><code>a = pyglet.graphics.vertex_list(num*3, ('v4f', vs), ('c4f', color))
  </code></pre>
  
  <p>to define my draw list and use</p>
  
  <pre><code>a.draw()
  </code></pre>
  
  <p>within the on_draw(GL_TRIANGLES) function. </p>
  
  <p>As is, this works fine, it properly draws the vertices, offsets them, and they have the right color.   </p>
  
  <p>However, I wanted to use the layout(location=1)... line to grab the color instead of using gl_Color.   I would have thought if the calls to glVertexAttribPointer and  glEnableVertexAttribArray  were done for the color attribute in the way I can imagine doing them if I was making the calls to manually, then what I have would work.</p>
  
  <p>I see calls to </p>
  
  <pre><code>glVertexAttribPointer(self.index, self.count, self.gl_type,
                            self.normalized, self.stride, 
                            self.offset + pointer)
  </code></pre>
  
  <p>in pyglet's vertexattribute.py, so maybe I am misusing "layout" somehow</p>