MGL_realizePalette
Realizes the hardware color palette for the display device context.
Declaration
void MGLAPI MGL_realizePalette(
MGLDC *dc,
int numColors,
int startIndex,
ibool waitVRT)
Prototype In
mgraph.h
Parameters
dc |
Device context to realize palette for |
numColors |
Number of colors to realize |
startIndex |
Starting index of first color to realize |
waitVRT |
True if routine should sync to vertical retrace, false if not. |
Description
This function realizes the hardware palette associated with a display device context. Calls to MGL_setPalette only update the palette values in the color palette for the device context structure, but do not actually program the hardware palette for display device contexts in 4 and 8 bits per pixel modes. In order to program the hardware palette you must call this routine.
When the hardware palette is realized, you normally need to sync to the vertical retrace to ensure that the palette values are programmed without the onset of snow (see MGL_setPaletteSnowLevel to adjust the number of colors programmed per retrace period). If however you wish to perform double buffered animation and change the hardware color palette at the same time, you should call this routine immediately after calling either MGL_setVisualPage or MGL_swapBuffers with the waitVRT flag set to false.
See Also
MGL_setPalette, MGL_setVisualPage, MGL_swapBuffers, MGL_setPaletteSnowLevel
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com