Text Color...

Started by
4 comments, last by Mr_Mav 22 years, 3 months ago
Hi you all, i tried to use text in something that i''m doing and the output wasn''t the expected, i used nehe tutorials 13 (Bitmap Fonts) to output the text and the result was: http://www.mistermav.hpg.com.br/pic.jpg The source is: int DrawGLScene(GLvoid) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); ... Drawing ... // 2D to draw the text. glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glOrtho(0, 640, 0, 480, -100, 100); glFrontFace(GL_CCW); glDisable(GL_DEPTH_TEST); if (light) { glDisable(GL_LIGHTING); } glRasterPos2f(5.0f, 5.0f); glPrint("The text goes here."); // Back to 3D glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glEnable(GL_DEPTH_TEST); glEnable(GL_LIGHTING); return TRUE; } Now the problem is that i can''t change the text color, i tried a call to glColor3f() before glPrint() but the result wasn''t the expected (as i expected). Help me if you can. Thank you.
"Outside there are tricks and evil."http://go.to/3dprog
Advertisement
PROBLEM SOLVED. l0l
"Outside there are tricks and evil."http://go.to/3dprog
How do u solve the problem. I got the same error too.
Thanx~cyam95~
you must load anoter texture then the text has the texturecolor
i think
Not even close

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
is what you are after.

-----------------------
0wn 0wn 0wn your goat
gently down the pw33n
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
what u do u mean by ''bitmap fonts'' if u mean proper bitmaps then u need to disable texturing if u mean textured fonts then of copurse texturing needs to be enabled

http://uk.geocities.com/sloppyturds/gotterdammerung.html

This topic is closed to new replies.

Advertisement