Jump to content
  • Advertisement

Archived

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

Deline

On screen font colour

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

Hi, I have the following code in my display function: glPushMatrix(); glDisable(GL_TEXTURE_2D); int k; char *text = "SCORE"; glRasterPos3f(x,y,z); for(k=0; k<(int)strlen(text); k++) glutBitmapCharacter(TIMES_ROMAN, text[k]); glPopMatrix(); The code works fine but the writing is displayed in black (hard to see). I tried to put glColor3f(1.0, 0.0, 0.0) in front of glutBitmapCharacter() but it didn''t work, any suggestions? Alternatively how can I set the colour of a viewport? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I don''t have a retort for the first question but for the second one, do you mean this?

"glClearColor(0.0f, 0.0f, 0.0f, 0.5f);"

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.

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!