I am writing my first OpenGL program (in C using freeglut). I have the following code in my display function that works great and prints gray colored text:
glColor3f(0.5f, 0.5f, 0.5f); glRasterPos2f(0, 0); glutBitmapString(GLUT_BITMAP_HELVETICA_12, (unsigned char*)"some text");
Now I would like to try glutStrokeString instead of glutBitmapString. In my (humble) understanding, the API should work:
glScalef(0.003,0.003,1); glutStrokeString(GLUT_STROKE_ROMAN, (unsigned char*)"some text");
Running my program using these two lines instead of calling glutBitmapString shows the text once before it disappears. Moreover, from now on, all of my texts displayed with glutBitmapString do not work either. What am I missing here?
source share