GLUT fonts

How can I change the GLUT font color?
(Using glutBitmapCharacter)
Could I change the init. position of
my string?

Originally posted by kosta_m:
How can I change the GLUT font color?
(Using glutBitmapCharacter)
Could I change the init. position of
my string?

I believe you just set the current OpenGL
color before calling the font routine.
Fromt he docs on glBitmap:

A bitmap is a binary image. When drawn, the bitmap is positioned relative to the current raster position, and frame buffer pixels corresponding to 1s in the bitmap are written using the current raster color or index. Frame-buffer pixels corresponding to zeros in the bitmap are not modified.

//Short answer,

//Change the position
glRasterPos(posX, posY);

//Change color
glColor3f(r, g, b);

Originally posted by Questions Burner:
[b]//Short answer,

//Change the position
glRasterPos(posX, posY);

//Change color
glColor3f(r, g, b);[/b]

IIRC these two statements should be reversed: the bitmap color gets updated at the moment you modify the rasterpos (since that is when openGL decides which color to use for subsequent raster operations).

HTH

Jean-Marc