Jump to content
  • Advertisement

Archived

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

wglUseFontBitmaps() question

This topic is 5679 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Make sure your not call glColor anywhere in your display list... otherwise, it will always change the color back to white .

Billy - BillyB@mrsnj.com

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!