The wglRealizeLayerPalette function maps palette entries from a given color-index layer plane into the physical palette or initializes the palette of an RGBA layer plane.
Specifies the device context of a window whose layer plane palette is to be realized into the physical palette.
Specifies the overlay or underlay plane. Positive values of layerPlane identify overlay planes, where 1 is the first overlay plane over the main plane, 2 is the second overlay plane over the first overlay plane, and so on. Negative values identify underlay planes, where ?–1 is the first underlay plane under the main plane, ?–2 is the second underlay plane under the first underlay plane, and so on. The number of overlay and underlay planes is given in the bReserved member of the Gdi.PIXELFORMATDESCRIPTOR structure.
Indicates whether the palette is to be realized into the physical palette. When realize is true, the palette entries are mapped into the physical palette where available. When realize is false, the palette entries for the layer plane of the window are no longer needed and might be released for use by another foreground window.
If the function succeeds, the return value is true, even if realize is true and the physical palette is not available. If the function fails or when no pixel format is selected, the return value is false. To get extended error information, call GetLastWin32Error.
The physical palette for a layer plane is a shared resource among windows with layer planes. When more than one window attempts to realize a palette for a given physical layer plane, only one palette at a time is realized. When you call the wglRealizeLayerPalette function, the layer palette of a foreground window is always realized first.
When a window's layer palette is realized, its palette entries are always mapped one-to-one into the physical palette. Unlike GDI logical palettes, with wglRealizeLayerPalette there is no mapping of other windows' layer palettes to the current physical palette.
Whenever a window becomes the foreground window, call wglRealizeLayerPalette to realize its layer palettes again, even if the pixel type of the layer plane is RGBA.
Because wglRealizeLayerPalette doesn't realize the palette of the main plane, use GDI palette functions to realize the main plane palette.
Wgl Class | Tao.Platform.Windows Namespace | Gdi.PIXELFORMATDESCRIPTOR | wglGetLayerPaletteEntries | wglSetLayerPaletteEntries