Advertisement

Display Lists

Started by October 14, 2001 12:09 PM
1 comment, last by TheMummy 23 years, 4 months ago
Hi there, I am currently writting a bitmap font class... It worked fine two days ago but now ... I can''t get any display list indeces from openGL, everything I get back is a 0. I am creating 6 or 7 font objects, every object should have 256 lists. But when I load my Bitmaps and ask OpenGL: fontOffset = glGenLists(256); fontOffet is ''0'' for every font object.... Whats wrong ? Thanks in advance.
Is ''0'' a valid display list index ? ?
Here is some code:
print: const char *text
glRasterPos2d(x, y);
glPushAttrib(GL_LIST_BIT);
glListBase(fontOffset);
glCallLists(strlen(text), GL_UNSIGNED_BYTE, text);
glPopAttrib();

loadfont:
...
fontOffset = glGenLists(31+numKeys);
cout << gluErrorString(glGetError()); -> noerror
cout << fontOffset; -> 0
...


On Linux the code draws nothing and on Windows I get a fine bluescreen ......
pleasse HElp


Advertisement
Ok the blue screen hast nothing to do with this code ... I guess I have make closer look at the test application....

Do I have to enable something to use glBitmaps ?

This topic is closed to new replies.

Advertisement