Jump to content
  • Advertisement

Archived

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

Load Runner

multiple lines of text

This topic is 6035 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 would like some help on how to display multiple lines of text using nehe lesson17 without having to call glPrint over and over again. thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
come on,
its very simple u just make a function like Printf2()
define the max number of chars in one line to insert ''\n'' into the string
then pass this string into a string seperator, the string seperator should seperate the string in to another string buffer when ''\n'' found and then call glPrintf then translate down (char hight) or whatever then pass the another string ... etc



"The Railgun Master"
DaHeR

Share this post


Link to post
Share on other sites
You could put glPrint in a class (with the other font functions)
Make a function glBeginPrinting wich handles the initializing of glPrint, modify glPrint so it only does the printing, and create glEndPrinting wich will restore everything as it was before the printing. You would have code like this :

glBeginPrinting();
glPrint("something");
glPrint("something else");
glEndPrinting();

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!