Advertisement

Lesson 17 - font transparency problems

Started by February 16, 2002 09:22 PM
0 comments, last by Edge42 23 years ago
Hi, This is a very basic question but I''ve been struggling with it for a number of hours. I''m making a context menu where I want to have items drawn in black when they are not highlighted and white when they are. Using the code from lesson 17 with an RGB bitmap, the white text draws perfectly but the black text disappears. It seems that the closer to black the color that the text is drawn in, the more transparent it becomes. (And black is entirely invisible.) Why does it work like that and what do I need to change in the code so that I can set the color of the text without effecting the transparency? Thanks for help in advance! -Scott-
I think that you should use his code as a basis to write your own; his isn''t very practical in a lot of ways. My font class uses either GL_RGBA fonts, using the alpha channel for transparency, or GL_INTENSITY fonts. The latter kind use the one channel for color and alpha, but rely on glColor* to give them a color other than white. His code uses GLaux''s crappy bitmap loader, so obviously he''s doing it some way without using an alpha channel.

This topic is closed to new replies.

Advertisement