|
|
|
|
SetPaletteData
Programs the hardware color palette.
Declaration
void NAPI GA_driverFuncs::SetPaletteData(
GA_palette *pal,
N_int32 num,
N_int32 index,
N_int32 waitVRT)
Prototype In
snap/graphics.h
Parameters
pal |
Pointer to the palette data to program |
num |
Number of palette entries to program |
index |
Index of first entry to program |
waitVRT |
Wait for vertical retrace flag |
Description
This function programs the color palette information for the current graphics mode, and is only valid in 8-bpp and lower color index modes. Color palette information is passed to the function in an array of GA_palette structures. Each value in the GA_palette structure is 8-bits wide, with a range of 0 to 255. Note that this is different to the standard VGA palette programming routines, which normally take 6-bit wide values. Internally the driver will convert the 8-bit palette values to 6-bits if this is what the underlying hardware supports.
The wait for vertical retrace flag is used to synchronize the palette update with the start of the vertical retrace. The following are valid values:
value |
Description |
0 |
Change palette immediately not 0 - Program palette during vertical retrace period |
However if you are changing palette values at the same time as swapping display pages, you may want to disable vertical retrace synching and program the palette entries directly after swapping display pages. Generally you need to synchronize with the vertical retrace while programming the palette to avoid the onset of snow (or interference on the screen).
See Also
GetPaletteData, SetGammaCorrectData, GetGammaCorrectData, SetPaletteDataExt, GetPaletteDataExt, SetGammaCorrectDataExt, GetGammaCorrectDataExt
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com