View Full Version : Draw Text
01-31-2007, 12:22 PM
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!
02-01-2007, 05:44 AM
Could it be that you transformations are wrong? I would imagine that characters could be seen in unexpected places when the transformations are wrong.
02-01-2007, 11:35 AM
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?
02-02-2007, 11:03 AM
In debug mode, a lot of data is initialized to zero.
No init is done automatically in C/C++ release mode.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.