glutBitmapCharacter with glutSolidSphere problem
I am trying to create a scene with GLUT bitmap text and GLUT sphere at the same time (ortho and then pespective matrix).
Both are displayed well until I try to refresh the scene with glutPostRedisplay(), then the text disappears. But when i try to create the same scene with regular box instead of the GLUT sphere, everything goes fine.
Any idea why the text keeps disappearing?
It's somehow affected by polygon count of the sphere. If I lower it to 3, the text is visible, but it's grey instead of white. On higher polygon count, the text isn't visible.
Any idea why?
We need to see the code - it sounds like the text is being hidden by the sphere
I don't have the code on this computer, but I will post it later.
In any way, I found out that the problem must be in material used on the sphere or in a ligting of the scene because when I turn these off, everything's fine.
But how can lighting affect bitmap text in orthogonal projection?
If lighting is enabled, it affects the colour used by glBitmap() (specifically, glRasterPos() calculates the colour in the same manner as glVertex()). If you want to specify the colour directly with glColor(), disable lighting first.
Originally Posted by Triffid
Of course you are right.
Originally Posted by GClements