How to get a flat, non-interpolated color when using vertex shaders.
- by Brett
Hi,
Is there a way to achieve this? If I draw lines like this
glShadeModel(GL_FLAT);
glBegin(GL_LINES);
glColor3f(1.0, 1.0, 0.0);
glVertex3fv(bottomLeft);
glVertex3fv(topRight);
glColor3f(1.0, 0.0, 0.0);
glVertex3fv(topRight);
glVertex3fv(topLeft);
.
.
(draw a square)
.
.
glEnd();
I get the desired result (a different…