Problem with spaces in fonts

Started by
1 comment, last by kburkhart84 18 years, 6 months ago
Is there something special you need to do to get bitmap fonts to use spaces? I truncates all the spaces for me and its getting really annoying thanks for any help [grin] O btw here is my little text function that I use void Text(char* Text, int X, int Y) { glRasterPos2i(X,Y); glPushAttrib(GL_LIST_BIT); glListBase(base - 32); glCallLists((int)strlen(Text), GL_UNSIGNED_BYTE, Text); glPopAttrib(); }; It looks like it should work but maybe im setting one of the text flags wrong in creation...
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
Advertisement
Space is char 32, so I think with this code you will get a list id of zero, which is an invalid GL list id...
I use the same idea for text. I recommend creating all 256 characters instead of 96 like in NEHE's tutorials. Then you don't have to set the list base back 32, and the list should be correctly included for the "space" character.


This topic is closed to new replies.

Advertisement