void PEXDBSwapBuffer ( Display *display, PEXRenderer renderer, int swap_action, unsigned long clear_mask )
None.
Invoke PEXDBSwapBuffer to swap the back and front buffers for the window associated with the specified renderer. The swapping action does not modify the ID's associated with the window and the back buffer, so the application may continue to reference the "front buffer" and the "back buffer" with the same ID's it used to refer to the window and back buffer before the swap request.
After the swap, the implementation first performs the specified swap_action on the back buffer as follows:
The implementation then performs clear functions using the PEX renderer and PEX renderer attributes after the swap_action is complete, according to the settings of the flag in clear_mask. The implementation may use the renderer's background color, background color's alpha (1.0 if not present), Z clear value, or clip list attributes during the clear action, again depending on the clear_mask.
Note that the implementation processes the swap_action first, followed by the clear action specified by clear_mask. When the renderer's clip list is empty, a renderer clear action will "wipe-out" the result of the swap_action. In this case, the implementation may optimize the swap, swap_action, and clear action into a single swap and clear, using the renderer's background color.
As another example, if the renderer has a non-empty clip list and a clear image is called for by the client, then the implementation cannot optimize away the swap_action because the results of the swap_action are visible outside of the renderer's clip list. If the swap_action is PEXDBSwapBackground, then the X window's background tiling will be visible outside the ranges defined by the clip list. The implementation fills the regions within the clip list with the renderer's background color.
For an overview, see PEXlib Access and Information Functions.