Sign in to follow this  

TrueType Font Tutorial

This topic is 4686 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

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?

Share this post


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

Share this post


Link to post
Share on other sites

This topic is 4686 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this