Does anybody know (mathematically) how OpenGL smoothens colours across primitives that are drawn. i.e. if I draw a line:

glBegin(GL_LINES);

glColor3f(1.0, 0.5, 0.0);

glVertex3f(0.0, 0.0, 0.0);

glColor3f(0.5, 0.0, 0.3);

glVertex3f(2.0, 0.0, 0.0);

glEnd();

how does it calculate the chosen RGB values all along the line based on the RGB values for the end points? What is the mathematical relationship?

Thanks.

[This message has been edited by Rajveer (edited 04-23-2002).]

Originally posted by Rajveer:

[b]Does anybody know (mathematically) how OpenGL smoothens colours across primitives that are drawn. i.e. if I draw a line:

glBegin(GL_LINES);

glColor3f(1.0, 0.5, 0.0);

glVertex3f(0.0, 0.0, 0.0);

glColor3f(0.5, 0.0, 0.3);

glVertex3f(2.0, 0.0, 0.0);

glEnd();

how does it calculate the chosen RGB values all along the line based on the RGB values for the end points? What is the mathematical relationship?

Thanks.

[This message has been edited by Rajveer (edited 04-23-2002).][/b]

This can be explained precisely in the spec of OpenGL such as:

http://www.opengl.org/developers/documenâ€¦000000000000000