Archived

This topic is now archived and is closed to further replies.

killingtime

Alpha in bitmap fonts

Recommended Posts

killingtime    122
Sorry that I''m asking this rather than just trying it but I tried it once before and it didn''t work, but now I''ve realized that other factors might have effected it. *Anyway* do bitmap fonts have an alpha channel if I used glColor4f? Thanks.

Share this post


Link to post
Share on other sites
Jumpman    122
well bitmaps (as in BMP) don''t have a alpha channel that can be saved with it.. most texture loaders will make their own alpha map by making one colour transparent and the rest opaque.

the alpha parameter in glColor4f will basically multiply what ever alpha value the source pixel has (so you can scale it up to down) before the alpha match function is processed and any blending occures.

if you are using Nehe font plotter then might want to try disabling the Alpha test and setting the blend to

glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);

this will allow you draw the font in colours that wouldn''t be possible before.. (ie pure black) (from a white font)

hope that helps

Share this post


Link to post
Share on other sites