Display Lists
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement