title: How can I specify per-face colors when using indexed vertex arrays in OpenGL 3.x?
body: <p>I'm trying to render a cube using an array of 8 vertices and an index-array of 24 (4<code>*</code>6) indices into the vertex array. But how can I specify <em>per-face</em> variables, like colors and normals without using deprecated functions? For this I need a separate set of indices, but when I specify two index-arrays (<code>GL_ELEMENT_ARRAY_BUFFERs</code>) and point them to different shader-variables (with two calls to glVertexAttribPointer) something goes wrong, and it doesn't render anything (but doesn't report any errors either - checked with glGetError). Do I have to use different calls to glDrawElements for each face, with color and normal loaded into uniform variables? </p>
  
  <p>To clarify, the problem arises when each of the 8 vertices are part of different faces and need different values for color and normal.</p>