Hello people!
I had this doubt while I was drawing a few GL_QUADS with a color gradient. I know that if I use something like the following I get a quad with a linear gradient from white to black.
glBegin(GL_QUADS);
glColor3f( 1.0f, 1.0f, 1.0f);
glVertex2f( 0, 0);
glVertex2f( 100, 0);
glColor3f( 0.0f, 0.0f, 0.0f);
glVertex2f( 100, 100);
glVertex2f( 0, 100);
glEnd
What I wanted to know is how can I make the gradient be expontential? The idea being that the 50% grey is NOT in the middle of the QUAD but somewhere else according to a defined formula.
Since openGL does the gradient by itself I had to ask!
Thanks!