I can't get glutBitmapCharacter() to work
The glAArg Demo source contains working glutBitmapCharacter code in an ortho view. It is used to draw the renderer name at the bottom of the window.
Yeah, I am.
I've managed to get text rendering now, using the following code:
Oddly enough, my application crashes the second time I call glRasterPos2i() in a frame. This means I can only print one line of text. Something, I expect, that will need to researched.
Thanks for all the tips and help you guys have given me though. I appreciate it.
Code:
void drawText(int x, int y, char *string)
{
int i, len;
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -5.0f);
glRasterPos2i(x, y);
glDisable(GL_TEXTURE);
glDisable(GL_TEXTURE_2D);
for (i = 0, len = strlen(string); i < len; i++)
{
glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int)string[i]);
}
glEnable(GL_TEXTURE);
glEnable(GL_TEXTURE_2D);
}Oddly enough, my application crashes the second time I call glRasterPos2i() in a frame. This means I can only print one line of text. Something, I expect, that will need to researched.
Thanks for all the tips and help you guys have given me though. I appreciate it.

