Archived

This topic is now archived and is closed to further replies.

-Thork-

wglUseFontBitmaps() question

Recommended Posts

Ok this may seem like a stupid question but here goes anyway. I''m using wglUseFontBitmaps to create the font for the UI of my game. I use glCallLists to draw the bitmaps that it creates. This all works fine and the text appears. What I can''t seem to do is change the colour of the text. I have tried changing the colour using glColor right before calling both wglUseFontBitmaps and glCallLists and this has made no difference. I even tried calling glFlush between each call to glColour and glCallLists/wglUseFontBitmaps, but still the font comes out in a colour that I used earlier in the drawing process. I''ve run out of ideas and MSDN doesn''t seem to provide any clues either. Any ideas?

Share this post


Link to post
Share on other sites
Thanks for the quick reply, but that''s not it either. I''m not using texturing or lighting at the moment. All I have is two polygons of one colour and the text being drawn. The text appears the colour of the polygons by the way.

Share this post


Link to post
Share on other sites
I seem to have been able to pinpoint the function which stops glColor from changing the colour of the text. It seems to be a call to glRasterPos which I call before drawing the text. The odd thing is however that if I call glRasterPos again, it changes the colour of the text like it should! *shakes head* Oh well...

Share this post


Link to post
Share on other sites
Yeah, you need to change the color prior to glRasterPosi. Setting the color before glRasterPos changes both the bitmap, and color primitives. Changing it after, changes primitive colors.

I don''t have a signature

Share this post


Link to post
Share on other sites