Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dbuffer_swi(3G) — HP-UX 9.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bank_switch(3G)

buffer_mode(3G)

clear_view_surface(3G)

display_enable(3G)

flush_buffer(3G)

inquire_display_mode(3G)

make_picture_current(3G)

write_enable(3G)

dbuffer_switch(3G)

NAME

dbuffer_switch − switch buffers when double-buffering

SYNOPSIS

C Syntax:

void dbuffer_switch(fildes,buffer);
int fildes,buffer;

FORTRAN77 Syntax:

subroutine dbuffer_switch(fildes,buffer)
integer *4 fildes,buffer

Pascal Syntax:

procedure dbuffer_switch(fildes,buffer:integer);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

buffer Least significant bit of this integer determines which buffer (odd or even) to write into. 

Discussion

dbuffer_switch switches between output buffers when double-buffering is enabled.  Besides the device file descriptor, this function takes one parameter: buffer, the least significant bit of which is used to select the output buffer used when writing to the graphics output device. 

When dbuffer_switch is called:

1.  Starbase waits (if necessary for visual continuity) for the graphics device to enter its vertical retrace period. 

2.  Either write_enable/display_enable or bank_switch is used to activate the selected buffer from the double-buffer pair. 

3.  The newly enabled write buffer is cleared using clear_view_surface, unless suppressed by the SUPPRESS_CLEAR mode in double_buffer.

If double-buffering is disabled and dbuffer_switch is called, then dbuffer_switch simply calls clear_view_surface, unless suppressed by the SUPPRESS_CLEAR mode in dbuffer_switch.

make_picture_current is not called from dbuffer_switch.  In general, it need not be called from the application program, since all preceding buffered primitives will be drawn before dbuffer_switch is processed.  Note that the dbuffer_switch call is itself buffered by Starbase. 

See Starbase Graphics Techniques for more information about using this routine with a window system. 

DEFAULTS

buffer = 0:Enable lowest buffer for writing.

SEE ALSO

bank_switch(3G), buffer_mode(3G), clear_view_surface(3G), display_enable(3G), double_buffer (3G), flush_buffer(3G), inquire_display_mode(3G), make_picture_current(3G), write_enable(3G).  Starbase Graphics Techniques: "Using Starbase in the X Window System". 

 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

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