|
|
|
|
MGL_glRealizePalette
Realizes the hardware palette for a device context when using OpenGL.
Declaration
void MGLAPI MGL_glRealizePalette(MGLDC *dc,int
numColors,int startIndex,ibool waitVRT);
void MGLAPI MGL_glRealizePalette(
MGLDC *dc,
int numColors,
int startIndex,
int waitVRT)
Prototype In
mgraph.h
Parameters
dc |
Device context to set palette for |
numColors |
Number of colors in the palette |
startIndex |
Starting index in the palette |
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_glSetPalette 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.
Note: This function is identical to the regular MGL_realizePalette function, however if you are running OpenGL you must use this function instead.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com