Jump to content
  • Advertisement
Sign in to follow this  
Bailey

OpenGL Text in openGL

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

*Edit* Shortly after this post i fugured it out, i just wasnt scaling enough at first Hey this is my first post on here, im doing a uni assignment atm and I am having trouble outputting text onto my screen. Im happy enough using standard windows fonts and so i tried glfont. When i run the program however i just get a sort of blueish blended box, below is my code: I was wondering if there was a better way to do this or if you could point out my mistake. Thanks in advance //Clear back buffer glClear(GL_COLOR_BUFFER_BIT); glClearColor(0.0, 0.0, 0.0, 1.0); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //Draw a string glColor3f(0.0F, 0.0F, 1.0F); myfont.Begin(); //scaler, xPos,yPos myfont.DrawString("Hello World!",0.01,-1.0F, 0.0F); [Edited by - Bailey on April 20, 2007 1:32:05 PM]

Share this post


Link to post
Share on other sites
Advertisement
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!