Draw Text

I use wglUseFontOutlines to draw text in OpenGL. The content of the text is created dynamically. Occasionally a strange character appears in the center of my view although I never draw any text at that position. The character which appears this way is random picked by the program. Anyone has similar experience? How to solve the problem? Any suggestion?

I call wglUseFontOutlines only once but try to display a dozen text strings with glListBase and glCallLists. Could this be the reason of the problem? Thank you!

Could it be that you transformations are wrong? I would imagine that characters could be seen in unexpected places when the transformations are wrong.


The problem appears in release version but not in debug version. Looks like the initialization problem. And it appears only occasionally and hard to repeat which makes the debug very difficult. I found if I intentionally use the list ID generated by glGenLists(1) for another shape as the parameter of glListBase, I can always repeat the problem. However, in my case, I use 1000 in glListBase, there is no list ID conflict, why the problem still appears sometimes?

In debug mode, a lot of data is initialized to zero.
No init is done automatically in C/C++ release mode.