You’re not trying to print out an int value (score) using
glCallLists(12, GL_INT, score);
are you?
The lists contain characters (a,b,c,d,e,f,…) so if you do
glCallLists(4, GL_BYTE, “test”);
it will scan the char-array “test”
So first it calls the list corresponding to ‘t’
then the one for e
then the one for s
then the one for t
If you want to print out score you first have to convert your int to a char-array using itoa or sprintf and then print out the char array just like you did the others.
int score = 512;
char score_chars[100];
sprintf(score_chars,“%d”,score);
glCallLists(strlen(score_chars), GL_BYTE, &score_chars[0]);
You can’t scale using bitmaps from wglUseFontBitmaps. You can change the position of the text by altering the glRasterPos parameters but you’ll have to calculate the offsets for centering yourself.
If you’re looking for a font renderer where all of the transformation matrices apply (scale,translate,rotate,…), I recommend quesoglc.