Advertisement

glusphere and bitmapped fonts interference

Started by May 21, 2002 03:59 PM
2 comments, last by andros 22 years, 9 months ago
I have a loop that draws gluspheres and prints text using display lists for a bitmapped font. The text looks fine if I don''t draw the spheres. If I do draw the spheres the text is extremely dim. The only light source is coming from 0.0, 0.0, 1.0, 0.0 and the text is 1.0, 0.0, 0.0, 0.0 from the sphere so it shouldn''t be shadowed by it as far as I can tell. Also if the spheres are there I can''t control the color of the text. I need to label these spheres so any help would be appreciated.
I had this problem as well; make sure you are turning off all states that could possibly affect the text, texturing, lighting, etc (in my case it was GL_TEXTURE_2D).
Hope this helps

diddly
Advertisement
I was able to make this problem go away by drawing the text before I draw the spheres.
I just discovered that gluSphere is changing some attribute without putting it back I can also solve the problem with
glPushAttrib(GL_ALL_ATTRIB_BITS)
glSphere(...)
glPopAttrib();

This topic is closed to new replies.

Advertisement