glBitmap - bit alignment

glBitmap() displays a binary bitmap, but how are the bits arranged in the bitmap? Are they byte aligned, word aligned or something else? I’m trying to build font bitmaps and can’t quite get it to work.


Bits within a row are drawn by extracting bit by bit for every consecutive byte pointed to by the pointer. And like any other image, new rows starts on an offset alignment defined by the unpack alignment (glPixelStore with GL_UNPACK_ALIGNMENT), which defaults to 4.

Thanks, it works now.