Jump to content
  • Advertisement

Archived

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

Prankster

fonts

This topic is 5805 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''m trying to display two strings using different typefaces, but what i''m doing now seems to overload and only display one string... i''ve had a thought about putting the fonts into the same list, but not sure if that''d work practically...haven''t really tried. any helpful directions appreciated, i''m quite new to fonts in opengl... a snippet
  
GLuint font_heading_base;
GLuint font_text_base;

void WriteText(char* text, int type)
{
	if(text==NULL) return;

	if(type==FN_HEADER)
	{
		glPushAttrib(GL_LIST_BIT);
		glListBase(font_heading_base);
		glCallLists(strlen(text), GL_UNSIGNED_BYTE,text);
		glPopAttrib();
	}
	else if(type==FN_TEXT)
	{
		glPushAttrib(GL_LIST_BIT);
		glListBase(font_text_base);
		glCallLists(strlen(text), GL_UNSIGNED_BYTE,text);
		glPopAttrib();
	}
}
  
i guess the if statement and stuff therein is the big bong here...HELP?

Share this post


Link to post
Share on other sites
Advertisement
My problem was that only one of the two strings were shown. I however found out that I made a call to glClear each time, so I''ve fixed it now, thanks anyway

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!