Archived

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

Text Color...

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites