Hello, I have an image with only one channel in it: the alpha.
Now I want to blend a constant color (say yellow) with the current frame buffer image using my image as the alpha factor.
So I would like to do a call to glDrawPixels(GL_ALPHA) using my alpha image with a blend function set up to do something like:
new_color = constant_coloralpha + dest(1-alpha)
I looked at the blend colour extension but I dont think I can use it to do the equation above
(I dont want src*constant_color…).
Really what I want is a way to have glDrawPixels to convert my alpha to (RedConstant, GreenConstant, BlueConstant,alpha) instead of (0,0,0,alpha) it’s doing now with the GL_ALPHA argument.
Any other way to do this ?
The only way I found to resolve my problem is to use the pixel transfer functions (scale=0, bias=my constant) but that turns out to be super slow on my card (software implemented when scale!=1).