lighting and vertex colours

Is there a possibilty to set the material diffuse component to the vertex colour coming from the vertex (e.g: glColor4f()) so that you have a different colour at each vertex if desired?
Till now I have done lighting in software doing the above with sending the lit vertice’s colour by glColor4f();.
To achieve this with a vertex program is also no problem (i love complete control), but what about implementations that do not support vertex_programms in hardware (like non-nvidia, non-ati cards of the last generation) ?

many thanks in advance

Chris

[This message has been edited by crain (edited 03-02-2002).]

Check out GL_COLOR_MATERIAL and glColorMaterial – when enabled, the material color will track any color changes (via glColor or color arrays).

yip … that was a rtfm on my side. should have read that :wink:

many many thanks …

chris

Originally posted by bpeers:
Check out GL_COLOR_MATERIAL and glColorMaterial – when enabled, the material color will track any color changes (via glColor or color arrays).