flush_buffer(3G)
NAME
flush_buffer − output buffered primitives to display and return without waiting for display hardware to finish
SYNOPSIS
C Syntax:
void flush_buffer(fildes);
int fildes;
FORTRAN77 Syntax:
subroutine flush_buffer(fildes)
integer∗4 fildes
Pascal Syntax:
procedure flush_buffer(fildes:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
Discussion
Flush_buffer outputs any previous graphics primitives that may still be in the device or driver buffers to the display device fildes. This command differs from make_picture_current in that it does not wait for the display device to finish its processing before returning. This means that make_picture_current will not return until all the pixels are on the screen and error checking is complete. Note that flush_buffer will update the picture just as fast as make_picture_current, it simply does not poll the hardware or sleep, waiting for completion, like make_picture_current does.
The use of flush_buffer instead of make_picture_current can lead to significant performance improvements on accelerated devices since the CPU can continue doing useful work while the graphics device is finishing its processing. This parallel processing capability greatly enhances performance. This command is especially useful for interactive graphics sessions at points where the operator must see the entire image in order to proceed.
Caution should be exercised not to overuse this command (or make_picture_current) since excessive flushing of system buffers will severely impact performance.
SEE ALSO
buffer_mode(3G), gclose(3G), make_picture_current(3G).
Hewlett-Packard Company — HP-UX Release 9.03: April 1994