Archived

This topic is now archived and is closed to further replies.

TheMummy

Display Lists

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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


Share this post


Link to post
Share on other sites