My primary goal is to have a lowpoly rendering style, so that each triangle has its own homogeneous color on all its fragments, meaning color is not interpolated between vertex.
I have my indices buffer with 4 values: 3 integers indicating the vertex index, and one ubyte indicating the color index from a 1D texture, which is just an array of 256 24bits colors in a vec3.
Is it possible to do this with opengl3.3 in core profile?
Do I need glVertexAttribDivisor? I'm not sure I really understand what it does exactly.
I've also heard about flat shading, but I don't know exactly how I could do it. I could also set a color per vertex, but triangles would share vertices, so it doesn't seem like a solution.