Hi,
It seems that glutBitmapString misses blank spaces.
I am making an animation, at each time step, I use glutBitmapString to print out some information like this,
sprintf(message, “step=%-8d t=%-15g mass=”, step, t);
glutBitmapString(GLUT_BITMAP_HELVETICA_18, (unsigned char*) message);
however, as the variables step ,t, change at each time step, and the message is of different length which should not be ( If I use printf("%s
",message) to print the same message to screen, it is of exact length and mass aligns at the same column). I need “mass=” to apear at the exact location at each time step.
Anybody else has met the same problem? Any suggestion how to fix it?
Thanks.