Skip to main content
GameDev.net gamedev.net
🔒 Locked

Render font help!

Started by stefu Jun 3, 2003 at 10:54 AM 2 replies 350+ views
Original Post
stefu
stefu
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?
stefu
stefu
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.
Leyder Dylan
Leyder Dylan
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/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
PM
PM
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!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.