Jump to content
  • Advertisement
Sign in to follow this  
Flawe

2D text color problem

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

How come I can't chagne the color with which I render the text, but everything else changes color? Here's my code: GLUT glut = new GLUT(); int font = GLUT.BITMAP_HELVETICA_18; gl.glColor3f(0,1,1); gl.glRasterPos3f(10, 20, 0); glut.glutBitmapString(gl, font, "Text"); The text is black in the upper left corner but everything else get a greenish layer on top. What am I doing wrong?? Thanx

Share this post


Link to post
Share on other sites
Advertisement
Well, just a guess, but perhaps you have texturing enabled when you render the text?

Share this post


Link to post
Share on other sites
That means the whole text will be textured using whatever texture coordinate was set before the call to glRasterPos. Try disabling texturing before rendering the bitmap text :)

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!