I am having a problem with blending modes. My bitmap font resides in an image with white letters and black background, so that I can occlude the black when I draw the text.
I use glBlendFunc(GL_SRC_ALPHA, GL_ONE) to get rid of the black background. I apply a colour to the font by changing the quad colour that the font characters are bound to, using glColor3f(). However, I have a background image some of which is white. When text is drawn on top of this (no matter what colour) is does not show up. I know it is the blending because when I turn blending off the text appears with the correct colour (albeit with the black background - the occlusion of which was the whole point in using blending in the first place).
For white areas will I have to change the blending function, or is there an all-encompasing solution? I’m relatively new to blending modes so I’m unsure of how best to proceed.
Thanks in advance for any help.
I’m not sure if it matters but I’m drawing the background using glDrawPixels() and as mentioned the font characters are mapped on coloured quads. The background is drawn first, then I turn off depth testing to draw the font.[/edit]
[This message has been edited by sckoobs (edited 11-12-2003).]