View Full Version : Font Problems
09-30-2003, 11:42 AM
Hello, I wrote a font function and it worked perfectly in my program but for some reason it doesn't work anymore. I know the font function works right because if I start a new program and use it it works there, but for some reason it doesn't want to display any text in my current program anymore. Are there any functions that need to be disabled before rendering the font? Such as glDisable(GL_CULL_FACE) or anything of the sort. Thanks for the help.
10-04-2003, 02:35 PM
You have to disable lighting before redering the font with
glDisable(GL_LIGHTING)and then enable it again with glEnable(GL_LIGHTING)or you will have problems.
10-04-2003, 03:20 PM
Things that could go wrong:
Depth testing, projection matrix, modelview matrix, alpha testing, texture matrix, texture image, vertex format, client enables, mis-matched push/pops, ...
Try removing pieces of your program until you can get it to work again.
Also, this is not at all an OpenGL question; this is a general "how do I debug stuff" question. Not that I know of a good "how to debug stuff" mailing list to refer you to, though; everyone I know learned this the hard way.
Also, you should sprinkle your program with assert(!glGetError()) -- this will pull a full stop when you make some mistake. Then you can go back and debug it. You should put these EVERYWHERE -- they'll be taken out in release mode, so they cost nothing in the final product.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.