#### Archived

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

# Render font help!

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

## Recommended Posts

I can''t get my font rendering transparently I have antialised font in greyscale image, 1 byte for each pixel, where value 255 is full visible and 0 is not visible. What is the right format to use in glTexImage2D? GL_LUMINANCE? GL_ALPHA? And what are teh blend functions to use? For example glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) reners just black rects. Or do I need to have RGBA texture, where R=G=B=255 and A varies?

##### Share on other sites
quote:
Original post by stefu
Or do I need to have RGBA texture, where R=G=B=255 and A varies?

This works with glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
But I''d want same effect with only aplha channel (without RGB) and so that I can change font color with glColor().

But if not possible thisa is ok then

Thanks.

##### Share on other sites
Have you tryed :

glDisable(GL_TEXTURE_2D);glColor();glEnable(GL_TEXTURE_2D);

========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/

##### Share on other sites
Well, try GL_ALPHA and set GL_RED_BIAS, GL_GREEN_BIAS and GL_BLUE_BIAS to the desired values (msdn.microsoft.com)

PM

Times change...

Excuse my poor english!