link19
12-18-2000, 05:27 AM
I cannot make text appear. I am using code from a NeHe tutorial: http://nehe.gamedev.net/tutorials/lesson13.asp
This is the print function:
GLvoid glPrint(const char *fmt, ...)
{
char text[256]; va_list ap;
if (fmt == NULL)
return;
va_start(ap, fmt);
vsprintf(text, fmt, ap); va_end(ap);
glPushAttrib(GL_LIST_BIT);
glListBase(pApp->m_base - 32);
glCallLists(strlen(text), GL_UNSIGNED_BYTE, text); glPopAttrib();
}
And then there's a BuildFont() function that creates the bitmap font. However im not getting results. What am i missing please??
This is the print function:
GLvoid glPrint(const char *fmt, ...)
{
char text[256]; va_list ap;
if (fmt == NULL)
return;
va_start(ap, fmt);
vsprintf(text, fmt, ap); va_end(ap);
glPushAttrib(GL_LIST_BIT);
glListBase(pApp->m_base - 32);
glCallLists(strlen(text), GL_UNSIGNED_BYTE, text); glPopAttrib();
}
And then there's a BuildFont() function that creates the bitmap font. However im not getting results. What am i missing please??