PDA

View Full Version : Problem with glCallLists



Tom Thorp
03-31-2008, 12:45 PM
I'm using the following code out of the red book to display text on the screen. Until this afternoon, this has been working fine.

-----------------------------------------------------------
glPushAttrib(GL_LIST_BIT); // Pushes The Display List Bits
glListBase(_baseFont); // Sets The Base Character to 0
int sizeChar = courseStrBA.size();
glCallLists(sizeChar, GL_UNSIGNED_BYTE, courseStrBA.data()); // Draws The Display List Text
glPopAttrib();
-------------------------------------------------------------

Now, whenever I call glCallLists, my display becomes really odd, like something is being overwritten. Until, I call that function everything works fine. Once I call it, the text is fine and half of the graphics are. The other half look like they have their normals reversed (really odd).

Any thoughts on where to look?

Environment - Windows XP, VS2005 and running QT(Trolltech) wrapper around opengl.


Tom

Relic
04-01-2008, 06:02 AM
Are the fonts generated with wglUseFontOutlines?
Then it probably changed your front face setting.

Check out the manual
http://msdn2.microsoft.com/en-us/library/ms537567.aspx