printing - What is the easiest way to print text to screen in OpenGL? -
I need to print 3 lines of text in a window as a menu I
< Code> 1 - Menu 2 - Stop 3 - Exit
Considering that You have used GLTUT in the previous questions, the easiest way would be to create the font rendering functions of GLUT.
Example:
zero output (int x, int y, float r, float g, float b, int font, char * string) {glColor3f (r, g) ), B); GlRasterPos2f (x, y); Intel Lane, I Len = (int) strlen (string); For (i = 0; i
where the font of the full font constants:
GLUT_BITMAP_8_BY_13 GLUT_BITMAP_9_BY_15 GLUT_BITMAP_TIMES_ROMAN_10 GLUT_BITMAP_TIMES_ROMAN_24 GLUT_BITMAP_HELVETICA_10 GLUT_BITMAP_HELVETICA_12 GLUT_BITMAP_HELVETICA_18
Comments
Post a Comment