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''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
i guess the if statement and stuff therein is the big bong here...HELP?
Your rendering code looks ok. It may be a problem in the code that sets up the font display lists.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement