when i try to plot some strings with the following code:
// label min and max for current vector
glRasterPos2f(nx+1,y1);
glutBitmapString(GLUT_BITMAP_8_BY_13,"min");
glRasterPos2f(nx+1,y2);
glutBitmapString(GLUT_BITMAP_8_BY_13,"max");
i get the error
error: ‘glutBitmapString’ was not declared in this scope
upon compilation. the crazy thing is that
// label min and max for current vector
glRasterPos2f(nx+1,y1);
glutBitmapCharacter(GLUT_BITMAP_8_BY_13,'1');
glRasterPos2f(nx+1,y2);
glutBitmapCharacter(GLUT_BITMAP_8_BY_13,'2');
compiles just fine, so it’s not like i have not included the glut library or anything (i have glutSwapBuffers() and a bajillion other glut calls as well!)
why on earth won’t glutBitmapString() compile? i have checked the spelling and everything, and it just won’t compile!
What implementation of Glut are you using? According to the FreeGlut documentation, the original Glut does not include
glutBitmapStringhttp://freeglut.sourceforge.net/docs/api.php#FontRendering
And indeed, there is no mention of
glutBitmapStringin the Glut documentationhttp://www.opengl.org/resources/libraries/glut/spec3/node75.html#SECTION000110000000000000000
If you really need to use this function it looks like you will need to use FreeGlut.