Bitmap Text

The GLUT function glutBitmapCharacter() draws bitmapped text characters.

A bitmap is a 1-bit deep image - i.e. a 2D array of on & off pixels.

A bitmap's position is affected by 3D transformations, but its size is always the same (1 bitmap pixel = 1 screen pixel). It always appears "flat" on the display (i.e. not rotated).

The drawing position for a bitmap is set using glRasterPos:

        glRasterPos2f(x, y)
        glRasterPos3f(x, y, z)

After a bitmap is drawn, the raster position is automatically advanced to the right by the size of the bitmap.

Note: if the starting raster position is outside of the window viewport, the character string will not be drawn.

RGB text could be drawn by creating functions similar to glutBitmapCharacter(), but using glDrawPixels instead of glBitmap.



next