PDA

View Full Version : Glut.BitmapFont makes program open & close



ScottHKR
03-01-2011, 12:52 PM
Hi, I am doing a project at University and I am wanting my game to simply display some text.

I have this method:

private static void RenderString(int x, int y, string str)
{

Gl.glRasterPos2f(x, y);
int len = str.Length;
for (int i = 0; i < len; i++)
{

Glut.glutBitmapCharacter(Glut.GLUT_TIMES_ROMAN, str[i]);
}

}

And when I call it using:

RenderString(200,200,"TEST");

And run it in VisStudio it just flashes my program open and then closes it again.

If I don't include a call or comment it out, everything else in my program works fine.

It isn't as if it throws an exception as it did originally with some .dll stuff.

Any help would be greatly appreciated

Thanks in advance, Scott