TrueType Font Tutorial

Started by
1 comment, last by Net3D1 19 years, 2 months ago
I have a note on the TrueType Tutorial (lesson 43). I think i found a way to make the fonts look better by changing the glBlendFunc. In the print function - From: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //fonts look smudged in white bg To: glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); //no smudge ! I'm not sure what this does exactly, but it works.. What do you think?
Advertisement
Hi,

When using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); you should also be able to achieve the same smudgelss results by changing the color to (r, g, b, 1.0) before drawing the font.

By using glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); you are basically telling opengl to always set the alpha of the text to 1.0.

You can actually do a lot of neat things with blending, because you can control both the thing you are blending and the thing you are blending to. Check the opengl redbook for more neats stuffs:

http://www.gamedev.net/reference/count.asp?LinkID=993

Have fun blending :),
-llvllatrix
Thanks !

This topic is closed to new replies.

Advertisement