View Full Version : How can I use fonts w/o changing the texture's color?
I bind the texture, draw quad, set color, then draw font, and.. the texture's color is affected. Why?
I use ortho mode, the texture is bmp.
Please help! (I code in C++)
04-11-2003, 10:43 AM
perhaps you should disable GL_TEXTURE_2D before the output of that font?!....
nope.. thanx, though.
04-11-2003, 05:52 PM
Which parameter do you set with glTexEnv(GL_TEXTURE_ENV_MODE, ???) ... try GL_REPLACE. Default is GL_MODULATE.
is my opengl version outdated? Where should I download the upgrade?
04-12-2003, 04:18 AM
call: glColor3f(1.0f, 1.0f, 1.0f) before you draw your text...
...hope this solves your problem!
the texture is in original color (YAY!), but I can't see the fonts (T_T). Also that means the fonts are always be white??
My program goes like this: main loop calls render scene function. Inside the render scene first it loads the background texture, then draw the fonts. So the BG is loaded over and over again. Cause if I just load it once, it would blink and gone. then the fonts are visible.
Or should I just make textures for the fonts? (OH MY GOD)
04-14-2003, 03:40 AM
Probably you forgot to restore the color after the first loop , and with the useage of GL_MODULATE this color will affect your texture appearance ...so you must
restore your color after rendering the font ( i.e glColor3f(1.0,1.0,1.0) .... to get white color)
or use GL_REPLACE in yout texture enviroment setting.
[This message has been edited by raverbach (edited 04-14-2003).]
04-14-2003, 03:43 AM
I canīt understand , but now youīre rendering things correct but canīt see the fonts ?
If itīs that try disabling the texture units that youīre using then render the fonts.
thanks!! You're right, i forgot to change the color back to white.
I am now using LMNOpc Bitmap Font Builder. (I didn't even know that such program exists http://www.opengl.org/discussion_boards/ubb/smile.gif )
Thank you so much for your helps! Sorry if i troubled you. i'm new in programming.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.