Renders a bitmap character using OpenGL.
Bitmap font to use. Without using any display lists, glutBitmapCharacter renders the character in the named bitmap font. The available fonts are:
Value | Description |
---|---|
GLUT_BITMAP_8_BY_13 | A fixed width font with every character fitting in an 8 by 13 pixel rectangle. |
GLUT_BITMAP_9_BY_15 | A fixed width font with every character fitting in an 9 by 15 pixel rectangle. |
GLUT_BITMAP_TIMES_ROMAN_10 | A 10-point proportional spaced Times Roman font. |
GLUT_BITMAP_TIMES_ROMAN_24 | A 24-point proportional spaced Times Roman font. |
GLUT_BITMAP_HELVETICA_10 | A 10-point proportional spaced Helvetica font. |
GLUT_BITMAP_HELVETICA_12 | A 12-point proportional spaced Helvetica font. |
GLUT_BITMAP_HELVETICA_18 | A 18-point proportional spaced Helvetica font. |
Rendering a nonexistent character has no effect. glutBitmapCharacter automatically sets the OpenGL unpack pixel storage modes it needs appropriately and saves and restores the previous modes before returning. The generated call to Gl.glBitmap
will adjust the current raster position based on the width of the character.
EXAMPLE
Here is a routine that shows how to render a string of text with glutBitmapCharacter:
private void PrintText(float x, float y, string text) { Gl.glRasterPos2f(x, y); foreach(char c in text) { Glut.glutBitmapCharacter(Glut.GLUT_BITMAP_HELVETICA_18, c); } }
Glut Class | Tao.FreeGlut Namespace | glutBitmapWidth | glutStrokeCharacter