What’s an OpenGL® bitmap?

Print anything with Printful



An OpenGL bitmap can refer to a 1-bit image or a color image stored in a certain format. It is often used for transparency masks, text display, and creating symbols and icons. It is also useful for creating transparency masks to sculpt shapes from primitive types.

An OpenGL® bitmap can be one of two things, depending on the context in which the term is used. The original meaning of a bitmap is an image where each pixel location is stored in one bit, giving it a value of transparent or solid. Since the introduction of some image file formats, the term “bitmap” has also come to mean color images stored in a certain format, and eventually digital images in general. At the source code level, an OpenGL® bitmap takes on its original meaning, and the simplified image is often used to create a transparency mask, display text or icons, or serve as a texture or simple overlay. When the term is used to refer to any digital image, these are often used as two-dimensional (2D) textures to be mapped onto polygons.

A true two-color OpenGL® bitmap takes up very little storage space on a disk and can also take up very little memory while a program is running, depending on the implementation. The bitmap consists only of true and false values, so it can be used to create very accurate fonts, although intrinsic color information cannot be included in the file. This precision and simplicity has made the bitmap one of the most widely used methods for creating, storing, and representing symbols, icons, and nearly any graphical detail that requires only information about whether or not a single pixel is being used.

A common use for an OpenGL® bitmap is to display text within a scene. This is because there are a wide variety of bitmap fonts available. In the simplest implementation, a quadrilateral is formed within the scene and bitmap font characters are typeset on the shape to form words and sentences. The false areas of the bitmap image are transparent, which means the background will be visible. An added bonus is that text will rotate with the scene if desired, or can be constantly translated to face the camera, providing a sort of permanent, heads-up display.

Another use for an OpenGL® bitmap is to create a transparency mask. This is the same concept as a font, except that the bitmap is used to make areas of a three-dimensional (3D) shape transparent, effectively granting the ability to sculpt shapes from primitive types that might be difficult or impossible to achieve with a 3D model. This technique is sometimes used to depict trees in a scene, where the detail of the branches and leaves might otherwise be difficult. A normal color mesh is usually mapped over the transparency mask to complete the illusion.




Protect your devices with Threat Protection by NordVPN


Skip to content