Render font help!
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?
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.
Have you tryed :
========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/
glDisable(GL_TEXTURE_2D);glColor();glEnable(GL_TEXTURE_2D);
========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/
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!
PM
Times change...
Excuse my poor english!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement