GM_setPalette

Sets the color palette entries

Declaration

void MGLAPI GM_setPalette(
    palette_t *pal,
    int numColors,
    int startIndex)

Prototype In

gm/gm.h

Parameters

pal

Array of palette values to set

numColors

Number of colors to set

startIndex

Starting index in device context palette

 

Description

This function sets the palette values for the currently activate Game Framework device context to the values passed in pal. Note that this function does not program the hardware palette, but simply updates the internal palette values for the MGL device context. Once you have set the values in the palette, you should then call GM_realizePalette to program the hardware palette entries from the values currently stored in the MGL display device context.

Note:    If we have a memory back buffer we also set the palette values for this to ensure we have an identity palette for blit operations for maximum speed.

See Also

GM_realizePalette

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