If I want to draw a red and blue square using triangles without multiple draw calls, as far as I'm aware that'd be 12 elements for the shape vertices (makes sense) but I'd also need to use 12 elements for only two colors because I need to define a color for each vertex which is exponentially redundant the more vertices I use for a shape.
Is there any way to, say, skip an attribute however many times such that these line up
vertices = [0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1
1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 2]
colors = [1, 0, 0, 1,
0, 0, 1, 1]
So the first color (the first vec4 in colors) applies to the first six points in vertices and the second color applies to the next six points.
Is this possible or do I have to redefine the same color for every vertex in a shape?