Advertisement

Alpha blending question (using bitmap fonts)

Started by January 27, 2003 01:31 PM
0 comments, last by stodge 22 years, 1 month ago
I''ve adapted the Nehe code for bitmap fonts into my application. The basic font rendering works beautifully (thanks!), and I can control the transparency of the text using the alpha channel. Is it possible to change the colour of text? I tried:
  			glEnable(GL_BLEND);
			glBlendFunc(GL_SRC_ALPHA,GL_ONE);
			glColor4ub(255, 0, 0, 200);  
before rendering the text, but it doesn''t affect the text colour at all. Is this possible? Thanks
---------------------http://www.stodge.net
Try using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) instead.

Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared

This topic is closed to new replies.

Advertisement