luhtor
Messages postés
2023
Date d'inscription
mardi 24 septembre 2002
Statut
Membre
Dernière intervention
28 juillet 2008
6
21 déc. 2004 à 12:40
Si ton texte n'est pas important, tu peux faire comme moi:
Ca utilise glut.
Je sais plus ou j'ai trouvé ce code, mais tu mets ca quelque part.
void drawString (char *s)
{
unsigned int i;
for (i = 0; i < strlen (s); i++)
glutBitmapCharacter (GLUT_BITMAP_HELVETICA_10, s[i]);
};
void drawStringBig (char *s)
{
unsigned int i;
for (i = 0; i < strlen (s); i++)
glutBitmapCharacter (GLUT_BITMAP_HELVETICA_18, s[i]);
};
Après pour l'appel des fonctions, tu tapes ca:
char label[100];
sprintf (label, " TON TEXTE ");
glRasterPos3f (0.40f, 0.70f, 2.0f);
drawStringBig (label); // ou drawString
Bon c'est pas très jolie, mais pour moi ca me suffisait.