Jump to content
  • Advertisement

Archived

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

Edge42

Lesson 17 - font transparency problems

This topic is 5941 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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-

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!