Constant color blending allows you to specify input source with constant alpha that is not 1 without actually specifying the alpha for each pixel. Alternatively, when working with visuals that have no alpha, you can use the blend color for constant alpha. This also allows you to modify a whole incoming source by blending with a constant color (which is faster than clearing to that color). In effect, the image looks as if it is viewed through colored glasses.
void glBlendColorEXT( GLclampf red, GLclampf green, GLclampf blue,
GLclampf alpha )
The four parameters are clamped to the range [0,1] before being stored. The default value for the constant blending color is (0,0,0,0).
Rc, Gc, Bc, and Ac are the four components of the constant blending color. These blend factors are already in the range [0,1].
You can, for example, fade between two images by drawing both images with Alpha and 1-Alpha as Alpha goes from 1 to 0, as in the following code fragment:
glBlendFunc(GL_ONE_MINUS_CONSTANT_COLOR_EXT, GL_CONSTANT_COLOR_EXT);
for (alpha = 0.0; alpha <= 1.0; alpha += 1.0/16.0) {
glClear(GL_COLOR_BUFFER_BIT);
glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, image0);
glEnable(GL_BLEND);
glBlendColorEXT(alpha, alpha, alpha, alpha);
glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, image1);
glDisable(GL_BLEND);
glXSwapBuffers(display, window);
}