Jump to content
  • Advertisement
Sign in to follow this  
knobby67

OpenGL text changes colour in openGL

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

Hello. I've added text to my programme based on the lesson13 example on nehe. It works fine, however when I've added it to a demo with polys running it changes colour. For example if the text is yelllow when the demo is runnning it will change from bright yellow to deep yellow. I'm using glx with linux. I'm also using glcolor3f to set the text colour. And it doesn't make any difference if the text is on clear screen or if polygons are behind. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Hi,

Are the polys textured? If the polys are textured and drawn before the text then texturing might still be enabled when you draw the text.

If this is the case ensure that before drawing the text you have disabled texture mapping: glDisable( GL_TEXTURE_2D );

If not, could you post the render code and I can have a look?

Cheers,
dhm

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes they are textured I'll give that a try thanks, I've also just read on a site to glDisable(GL_LIGHTING);.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!