OPEN_SEGMENT(3G)
NAME
open segment − open a segment in display list of the specified device
SYNOPSIS
C Syntax:
void open_segment(fildes,segno,append,display)
int fildes,segno,append,display;
FORTRAN77 Syntax:
subroutine open_segment(fildes,segno,append,display)
integer*4 fildes,segno,append,display
Pascal Syntax:
procedure open_segment(fildes,segno,append,display:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
segno Name of the segment to open. Can be any integer value.
append Flag indicating whether the element pointer should be set to the end so that new elements will be appened, or whether the element pointer should be left unchanged.
display Flag indicating whether elements added to the segment are to be displayed on the associated graphics display device as they are added.
Discussion
Open_segment opens a segment in the display list of the specified graphics device. If there is already an open segment, that segment is closed before an attempt is made to open the new segment.
The element pointer is initially set according to the value of append. If append is TRUE (1), the element pointer is set to point to the last elment of the segment so that subsequent new elements are appended to the segment. If append is FALSE (0) the element pointer is left unchanged. This allows the element pointer to remain intact while a segment is closed.
Starbase functions that can be placed into a segment may alter Starbase or graphics display device operating states (such as color index or the matrix stack), depending upon the value of display. If display is TRUE (1) elements added to the open segment are also displayed on the associated graphics display device, thereby affecting the state of the graphics display device and/or Starbase. If display is FALSE (0) elements will only be added to the open segment and will not affect the state of Starbase or the graphics display device (except for vertex_format which is always affected). Subsequent inquiries of Starbase state thus will not reflect any change in state due to the Starbase functions invoked while a segment is open with display = FALSE (0). When the segment is displayed, refreshed, or picked from, the elements within the segment are executed and alter Starbase and graphics display device states accordingly.
ERRORS
1 Graphics device is not initialized for this operation.
SEE ALSO
Hewlett-Packard Company — December 25, 1986