I'm pretty new to opengl but been using c++ for a while now. How can I display variables using this? I can display single characters by using


Why can I not use

int x = 0;

Compiles but won't display anything.

Haven't used it for a while, but I think it takes the ascii value in int form.

if you wan't to use variable use a char variable

char print ='0';
for(print = '0'; print != '9'; print++)
  glutStrokeCharacter(GLUT_STROKE_MONO_ROMAN, print);

Also google the function, and you get a documentation, like this