Try to use direct rendering, issue a warning and use indirect rendering if this is not possible.
Controls the color index colormap entry of the current window's logical colormap for the layer in use. The layer in use of the current window should be a color index window. The color index should be zero or greater and less than the total number of colormap entries for the window (see numColorMapEntries) and different from an overlay's transparent index (see transparentIndex).
If the layer in use's colormap was copied by reference, setting a colormap entry will force the duplication of the colormap.
A plain menu entry with an associated callback, which is triggered when the user selects the entry