PDA

View Full Version : glPrint function



mochi
02-20-2002, 08:12 AM
how to i change the following glPrint function to print out integers instead of
characters???

GLvoid glPrint(const char *fmt, ...){

char text[256]; // Holds Our String
va_list ap; // Pointer To List Of Arguments

if (fmt == NULL) // If There's No Text
return; // Do Nothing

va_start(ap, fmt);
vsprintf(text, fmt, ap);
va_end(ap);

glPushAttrib(GL_LIST_BIT);
glListBase(base - 32);

glCallLists(strlen(text),
GL_UNSIGNED_BYTE,text);
glPopAttrib();

}

chxfryer
02-20-2002, 10:05 AM
glPrint("%i",(integer variable here));