🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Lesson 13 help?

Started by
2 comments, last by wildhalcyon 18 years, 3 months ago
Im working on adding some text to my code (to keep track of some display variables as I move around the screen). Right now, I just have a few quads with 2 different textures, Im not using a display list for them however. Now, when I add the text code, everything goes wonky. The text may or may not be displayed (this seems to be a problem with scaling - the lesson says that the bounds are +-0.5f, but on my screen, its more like +-0.4 in the y direction, I've corrected this so long as nobody resizes the window). The other problem has to do with coloring. I haven't set glEnable(GL_COLOR_MATERIAL);, yet the texture is still colored according to the text color. I've gotten around this by calling glColor3f before the texture to reset it to white, and then I call glColor3f for the text to change its color. Unfortunately, it doesn't seem to color according to the normal [0,1] scale. If I call glColor3f(1.0f,1.0f,1.0f); its a muddy yellow. Any suggestions on this?
Advertisement
Alright, here's a screen capture:

http://img156.imageshack.us/img156/4172/badtext3km.jpg

If anyone has any idea why its muddy, not white, I would LOVE to know?
It has a texture on it, to fix it simply put a glDisable(GL_TEXTURE_2D); in the beginning of your glPrint function.

If this removes all the other textures then add a glEnable(GL_TEXTURE_2D); just before rendering those objects.
Thanks!

This topic is closed to new replies.

Advertisement