Archived

This topic is now archived and is closed to further replies.

dani333

Alpha values for each vertex

Recommended Posts

Every vertex will use the current color, texture coordinate and normal when glVertex* is called.
glColor4fv(color1);
glVertex3fv(vertex1); // Will use color1 (and its alpha)

glColor4fv(color2);
glColor4fv(color3);
glVertex3fv(vertex2); // Will use color3

Note that in the above example, the second vertex will use color3, since that''s the last color set with glColor* before the glVertex* call.

So to set different alpha values for each vertex, just add a call to glColor* before each glVertex*.

Share this post


Link to post
Share on other sites