When I need to set color of some triangles, I need to define every vertex as follows:
{
float x;
float y;
float z;
float r;
float g;
float b;
float alpha;
}
But in this case, every vertex will have one color.
A triangle has 3 vertex, so it need 3 colors, and most of the time, every pixel of a single triangle has the same color.
But I need store 3 color for them, that's a waste of RAM, VRAM and GPU bandwidth.
How to storage only one color for each triangle?