I’m working on a program which reads polygons from file which have a colour attribute associated with it.
I am displaying the polygons like:
for each polygon
//colour[x] is a float between 0.0 and 1.0
for(each point in structure)
glVertex3f(,,); // set vertex
The polygons appear on screen but they are all the same colour…
Other initialization stuff i’m using
glLightfv(GL_LIGHT0, GL_POSITION, light_origin);
Perhaps it has something to do with the model view??
I’m a newbie and i’m stumped