True Color Virtual Buffers

In true color virtual buffers, each pixel occupies either three bytes (24 bits per pixel) or four bytes (32 bits per pixel) of memory, making it possible to use 16.7 million different colors concurrently. The data stored in these bytes directly determine the pixel color instead of serving as an index into a logical palette.

True color virtual buffers can utilize two distinct memory organizations or pixel formats: 24-bit RGB and 32-bit xRGB. Both true color formats provide 16.7 million colors, but the 32-bit format requires 25% more memory. The 24-bit format is often designated 24bpp (bits per pixel), while the 32-bit format is designated 32bpp.

When using a 24bpp memory organization, the three bytes representing each pixel contain a red, green, and blue color component. The blue component is stored in the low order byte, followed by the green component and then the red component. The 32-bit xRGB organization is similar to 24-bit RGB, but an unused byte, sometimes called the alpha channel, follows the red byte. This means each pixel begins on a four-byte boundary and generally results in faster pixel access. In all cases, the RGB color components are between 0 and 255, with increasing values producing more intense colors.

Fastgraph transparently handles the differences between 24-bit and 32-bit true color virtual buffers with one notable exception: the fg_getblock() and fg_putblock() legacy functions.

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.