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 use.
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_select 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, 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 performed.
DEFAULTS
buffer = 0:Enable lowest buffer for writing.
SEE ALSO
double_buffer (3G), Starbase Graphics Techniques.
Hewlett-Packard Company — May 11, 2021