Copyright (C) 2000-2012 |
Manpages glutStrokeCharacterSection: GLUT (3GLUT)Updated: 3.7 Index Return to Main Contents NAMEglutStrokeCharacter - renders a stroke character using OpenGL.SYNTAXvoid glutStrokeCharacter(void *font, int character); ARGUMENTS
DESCRIPTIONWithout using any display lists, glutStrokeCharacter renders the character in the named stroke font. The available fonts are:
Rendering a nonexistent character has no effect. A glTranslatef is used to translate the current model view matrix to advance the width of the character. EXAMPLEHere is a routine that shows how to render a string of ASCII text with glutStrokeCharacter:void output(GLfloat x, GLfloat y, char *text) { char *p; glPushMatrix(); glTranslatef(x, y, 0); for (p = text; *p; p++) glutStrokeCharacter(GLUT_STROKE_ROMAN, *p); glPopMatrix(); } If you want to draw stroke font text using wide, antialiased lines, use: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_LINE_SMOOTH); glLineWidth(2.0); output(200, 225, "This is antialiased."); SEE ALSOglutBitmapCharacter, glutStrokeWidthAUTHORMark J. Kilgard (mjk@nvidia.com)
IndexThis document was created by man2html, using the manual pages. Time: 07:41:22 GMT, April 19, 2024 |