I'm trying to convert my score from integer to string. The glutbitmap doesnt recognize string. How to make it recognize.So far I've done this
while(z>9)
{
k = z % 10;
glutBitmapCharacter (GLUT_BITMAP_TIMES_ROMAN_24,48+k);
// glRasterPos2f ((posx-(j*space_char)),posy,);
z = z/10;
// glRasterPos3f ((posx-(j*space_char)), posy, posz);
}
glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24,48+z);
glFlush();
}
The above code is showing integer but after 9 it shows 01,11,21,31,41 it is coming opposite. So please help me in resolving this in OPENGL.