### Color Values

All color values passed to the accelerated rendering functions are packed pixel values, that will need to be pre-packed into the proper format required by the current framebuffer mode. In 8 bit color index modes, this is simply a color index between 0 and 255. In the 15 bits per pixel and above modes, you will need to pack the color values according to the RGB pixel format information stored in the GA_modeInfo information block. The RGB pixel format information specifies the mask size and bit positions for all red, green, blue and alpha components (alpha is generally ignored for framebuffer values). These mask should be used by the application to pack the appropriate RGB color values into a 32-bit integer to be passed to the appropriate rendering routines.

Currently the alpha component in 15-bit and 32-bits per pixel modes is unused, and should always be set to 0 for normal 2D rendering operations, as on some controllers these bits may be significant. For alpha blended operations, these bits can be used to control the blending of pixel colors during rendering.

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com