wglSwapLayerBuffers function (wingdi.h)
The wglSwapLayerBuffers function swaps the front and back buffers in the overlay, underlay, and main planes of the window referenced by a specified device context.
Syntax
BOOL wglSwapLayerBuffers(
HDC unnamedParam1,
UINT unnamedParam2
);
Parameters
unnamedParam1
Specifies the device context of a window whose layer plane palette is to be realized into the physical palette.
unnamedParam2
Specifies the overlay, underlay, and main planes whose front and back buffers are to be swapped. The bReserved member of the PIXELFORMATDESCRIPTOR structure specifies the number of overlay and underlay planes. The fuPlanes parameter is a bitwise combination of the following values.
Return value
If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError.
Remarks
When a layer plane doesn't include a back buffer, calling the wglSwapLayerBuffers function has no effect on that layer plane. After you call wglSwapLayerBuffers, the state of the back buffer content is given in the corresponding LAYERPLANEDESCRIPTOR structure of the layer plane or in the PIXELFORMATDESCRIPTOR structure of the main plane. The wglSwapLayerBuffers function swaps the front and back buffers in the specified layer planes simultaneously.
Some devices don't support swapping layer planes individually; they swap all layer planes as a group. When the PFD_SWAP_LAYER_BUFFERS flag of the PIXELFORMATDESCRIPTOR structure is set, it indicates that a device can swap individual layer planes and that you can call wglSwapLayerBuffers.
With applications that use multiple threads, before calling wglSwapLayerBuffers, clear all drawing commands in all threads drawing to the same window.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h |
Library | Opengl32.lib |
DLL | Opengl32.dll |