Jump to content
  • Advertisement

Archived

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

sdlprorammer

OpenGL Fonts in OpenGL

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

I was wondering about something: In SDL, to write something in the screen, you have to use an image which contains the fonts. or you can write your own function that will draw the letters, depending on your own drawing skills. My qustion is, what happens in OpenGl? Do u still need to have the picture with the letters in your computer to write text? thanks

Share this post


Link to post
Share on other sites
Advertisement
With wglLoadFont or whatever the function is, Fonts in OpenGL are pretty *** easy. check out nehe.gamedev.net tutorials on the font subject.

Getting nice wrapping fonts is trickier... I''m currently looking into the FreeType2 docs to do this.

Share this post


Link to post
Share on other sites
Be careful though. Those wgl functions are Windows specific. So if you want cross-platform, you can''t use them.



First make it work, then make it fast. --Brian Kernighan

The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities. We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)

Do not interrupt your enemy when he is making a mistake. - Napolean Bonaparte

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
...remember just that using wglLoadFont produces good looking fonts but it''s *REALLY* slow... A 2d blitting of portions from a textured font is by far faster in OpenGL.

Share this post


Link to post
Share on other sites
NeHe

I''ve read a couple of your other threads and, while I don''t mean to sound like I''m flaming you, you really should do at least MINIMAL ressearch before posting threads. Many of them can easily be answered by looking through the docs real quick (for SDL) or by reading the NeHe tutorials.

If you''ve never heard of NeHe, I suggest going there and doing the tutorials. While NeHe isn''t going to teach you how to get the most out of OpenGL, it''ll teach you enough to get some rather good stuff going. You should have a look at the tutorials there before posting a thread, and only post if the resources there don''t answer your question.

It''s just a little irritating having to post the same link all the time.

Try here for tutorials on bitmapped fonts, as well as other means of displaying text in OpenGL. NeHe tutorials.

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!