Jump to content
  • Advertisement

Archived

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

Pazu21

Bitmapped Font

This topic is 5405 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

Hey people, I could use all of your help right now. I''m using the nehe code for Bitmapped Fonts, (glPrint..etc), and having a problem displaying the text whenever I show it with other objects in the scene. Here''s an example: glLoadIdentity(); glTranslatef(0.0f,0.0f,-4.0f); glBindTexture(GL_TEXTURE_2D, g_Texture[0]); glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex3f(-0.95f, 0.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(0.125f, 0.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(0.125f, 0.85f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-0.95f, 0.85f, 1.0f); glEnd(); glLoadIdentity(); glColor3f(0.4f,0.4f,0.9f); glRasterPos2f(0.15f,-0.75f); glPrint("David %d", life); When I do this, only the textured QUAD gets displayed and not the FONT. And if I take out the code for the QUAD, then the font is displayed.... Could some one help me out? Thanks alot. Ken

Share this post


Link to post
Share on other sites
Advertisement
is you text being drawn behind your quad?

try putting a glTranslatef(0.0f,0.0f,1.0f) before calling glRaterPos.

I''m only new to this stuff to but thats what i would try

Share this post


Link to post
Share on other sites
Thanks for th reply..
Unfortunately, that doesn''t seem to be the case.
When I translate the Font to
glTranslate(0.0f,0.0f,-2.0f), which is clearly closer than the QUAD translation, the text doesn''t show up...
So, if anyone knows why, please let me know....
thanks.

SHu

Share this post


Link to post
Share on other sites
Thanks Bourricot,
I needed to disable Texturing before displaying the font.
phewwwww... I really appreciate your help.
Thanks blakey for your help also.

Ken

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!