Category: 

What Is an OpenGL® Bitmap?

Article Details
  • Written By: Eugene P.
  • Edited By: Angela B.
  • Last Modified Date: 30 August 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The atmosphere of Jupiter's moon Io collapses every time it is eclipsed by the planet.   more...

September 29 ,  2008 :  The Dow Jones Industrial Average experienced its largest one-day drop in history.  more...

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 in which each pixel location is stored in a bit, giving it a value of transparent or solid. After the introduction of certain image file formats, the term "bitmap" also came to mean full-color images stored in a certain format and, eventually, digital images in general. At the source-code level, an OpenGL® bitmap takes the original meaning, and the simplified image is most often used to create a transparency mask, display text or icons, or to act as a texture or simple overlay. When the term is used to refer to any digital image, then these are most 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 also can occupy very little memory while a program is running, depending on the implementation. The bitmap is comprised of just true and false values, so it can be used to make very precise characters, although no intrinsic color information can 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 only requires information on whether a single pixel is used or not.

Ad

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 inside the scene and the bitmap font characters are composited onto the shape to form words and sentences. The areas of the bitmap image that are false are transparent, meaning the background will show through. An additional benefit is that the text will rotate with the scene, if desired, or can be constantly translated to face the camera, providing a kind of heads-up, persistent display.

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

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}