cpack(3G)
cpack - specifies RGBA color with a single packed 32-bit integer
As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.
NAME cpack - specifies RGBA color with a single packed 32-bit integer C SPECIFICATION void cpack(pack) unsigned long pack; PARAMETERS pack expects a packed integer containing the RGBA (red, green, blue, alpha) values you want to assign as the current color. Expressed in hexadecimal, the format of the packed integer is 0xaabbggrr, where: aa is the alpha value, bb is the blue value, gg is the green value, and rr is the red value. RGBA component values range from 0 to 0xFF (255). DESCRIPTION cpack sets the red, green, blue, and alpha color components of the currently active GL framebuffer, one of normal, popup, overlay, or underlay (see drawmode). The current framebuffer must be in RGB mode (see RGBmode) for the cpack command to be applicable. Most drawing commands copy the current RGBA color components into the color bitplanes of the current framebuffer. Color components are retained in each draw mode, so when a draw mode is re-entered, red, green, blue, and alpha are reset to the last value specified in that draw mode. Color component values range from 0, specifying no intensity, through 255, specifying maximum intensity. For example, cpack(0xFF004080) sets red to 0x80 (half intensity), green to 0x40 (quarter intensity), blue to 0 (off), and alpha to 0xFF (full intensity). It is an error to call cpack while the current framebuffer is in color map mode. The color components of all framebuffers in RGB mode are set to zero when gconfig is called. SEE ALSO c, drawmode, gRGBcolor, lmcolor NOTE cpack can also be used to modify the current material while lighting is active (see lmcolor). Because only the normal framebuffer currently supports RGB mode, cpack should be called only while draw mode is NORMALDRAW. Use getgdesc to determine whether RGB mode is available in draw mode NORMALDRAW.