Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ PEXUtDBSwap(3G) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PEXUtDBSwap(3G)

Name

PEXUtDBSwap − swap the window buffers and clear the back buffer

Syntax

Drawable PEXUtDBSwap(Display *dpy, Window win, int clear)

Parameters

dpyA pointer to a display structure returned by a successful XOpenDisplay call. 

winThe resource identifier of the window for which the buffers are swapped. 

clearThe clear argument indicates whether to clear the new back buffer after the buffers are swapped. Valid values are or

Returns

The function returns a value of if it is unsuccessful; otherwise, the drawable identifier to be used for subsequent rendering calls is returned. See also the description of the drw_id_return argument for

Description

The function will swap the buffers of a window which is configured for double-buffering. If the window is not configured for double-buffering, the function will clear the window (if clear == and return the specified window identifier. 

Swapping the buffers means that the currently displayed buffer (i.e., the front buffer) is hidden, and the currently non-displayed buffer (i.e., the back buffer) is made visible. After this operation, the front and back buffers have swapped positions (i.e., the old front became the new back, and the old back become the new front). 

If was called with front == prior to the returned drawable identifier is the identifier of the front buffer.  Otherwise, the returned drawable identifier is the identifier of the back buffer. 

On PEX 5.1 servers, the best way to clear the back buffer is to clear during the next or with the drawable identifier returned. (This is done by setting the renderer’s clear_image flag to In this case, the clear argument to should be

On PEX 5.0 servers, the back buffer should be cleared by setting the clear argument to unless the application wants to render into the back buffer without clearing. 

is also provided to clear the back buffer independently of swapping the buffers. However, there are some restrictions on when it can be called (see

Restrictions

If it is necessary to ensure that all actions have completed before proceeding, the application should call after calling

This function should not be called with a window into which PEX is rendering.  should be called prior to

Renderer clip lists do not affect the clear operation. The entire back buffer is cleared. 

See Also

(c) Hewlett-Packard Company  —  HP PEXlib Release 5.1: January 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026