Hello, I know there’s probably a ton of topics on using text already but I was hoping to find out how to scale text using the method I was taught in class. The only drawback that I’ve read is that our method might not scale very well. Here is my code, although the scaling does nothing atm.
void Write(float X, float Y, char *String)
{
int Length;
void *font = GLUT_BITMAP_9_BY_15;
void *fonts =
{
GLUT_BITMAP_9_BY_15,
GLUT_BITMAP_8_BY_13,
GLUT_BITMAP_TIMES_ROMAN_10,
GLUT_BITMAP_TIMES_ROMAN_24
};
glRasterPos2f(X, Y);
Length = (int) strlen(String);
for (int i = 0; i < Length; i++)
{
glutBitmapCharacter(font, String[i]);
}
}
//This is from a draw function, I removed the irrelevant stuff
glPushMatrix();
glTranslatef(220, 150, 0.0);
glScalef(10, 10, 1);
glColor3f(0.392, 0.694, 1.0);
Write(0, 0, “Super Pacman V1.0”);
glPopMatrix();
glFlush(); glutSwapBuffers();
Thanks in advance for any help.