Archived

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

Text not showing - please help

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

I''m trying to display text within my game, using the common bitmap font method, using display lists. I have set up my program to display text, and have basically copied from Nehe''s Lesson 13: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13 My problem is that when using working code from the Nehe project in my own game, the text is nowhere to be found. I have translated the text into the view -1, on the Z axis. Disabled textures, and blending before calling the text display lists. Now, I know that OpenGL is a state machine, and settings left in other areas are applied to others, but I cannot seem to track down what is prohibiting the text from showing. Any help or suggestions would be greatly appreciated.

Share this post


Link to post
Share on other sites
Why don''t you just make your own routine? I mean, it takes only about 2 hours, and you learn something out of it.
And do NOT use display lists for text! It''s one quad/character, FFS!

Share this post


Link to post
Share on other sites
Thanks for the suggestion, Raduprv.

I''d still like to get this font rendering working, even if it''s with wasteful display lists. I do just need something to show me live information while debugging, until I can write a nice text system like that.

But still, if anyone would happen to have information to help me with my original problem, it would be appreciated.

Share this post


Link to post
Share on other sites
hmm turn off depth testing (glDepthFunc(GL_ALWAYS)
and maybe translate it only to -0.9 or so. If the near plane is -1, then having a value of -1 might mean its getting culled.

Share this post


Link to post
Share on other sites
Okay I finally figured it out.

Thanks to WarAmp, I think your suggestion got me on the right track.

I had to set glCullFace(GL_BACK); for my text

and glCullFace(GL_FRONT); for my 3d world

Now I just need to get my text to show up when the world is visible too.

Share this post


Link to post
Share on other sites