I am creating a series of scrolling windows, created by openGL. This code is legacy code and able to do this successfully. Then I want to add text to these scrolling lists, which I do through a drawing callback function. When the scrolling list appears in the window, the draw callback prints the text into the list. This normally works. However as I scroll to the 7th list it stops printing the text. I am able to select it, but it won't print the text. Here is the code I use for printing text to a scrolling list window:
void PrintString(const char *str, int ListBase) { glPushAttrib(GL_LIST_BIT) glListBase(ListBase) glCallLists(strlen(str), GL_UNSIGNED_BYTE, str) glPopAttrib() }
As I scroll through each list, I am calling this multiple times. It reaches this function and prints the text for the first six scrolling list. When it reaches the 7th it stops printing the text. I have spent hours on this problem and I have come to the conclusion that it is OpenGL and printing text. Please help. How do you print text in openGL, my fonts are already defined? Why would it not print it?