triangles in vertex array

Hi I have a vertex array in which I need to specify the color attribute only every 3 vertexes (once for every triangle) but I can’t figure out a way to do this.

It seems like interleaved arrays and calling drawarrays always wants matching array sizes depending on a vertex count, however, it seems like using 12 color values for each triangle rather than 4 is rather inefficient.

There’s no way you can specify this in your data. However, you can tell OpenGL to use only a single colour for the entire quad or triangle via glShadeModel (GL_FLAT).