Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ open_segmen(3G) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

inq_open_segment(3G)

close_segment(3G)

open_segment(3G)

NAME

open_segment − open a segment in the 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 appended, or whether the element pointer should be left unchanged. 

display Flag indicating how elements should be treated while this segment is open.  One of the following values should be specified.  DL_ONLY - indicates that the elements should be added to the segment but should not be sent to the associated graphics display device. This can also be specified by using the value FALSE (0). DL_AND_DISPLAY - indicates that elements should be added to the segment and be displayed on the associated graphics display device as they are added. This can also be specified by using the value TRUE (1). DISPLAY_ONLY - indicates that elements should not be added to the segment and should only be sent to the associated graphics display device.

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 set to DL_AND_DISPLAY (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 set to DL_ONLY (0), elements will be added to the open segment but will not be displayed 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 = DL_ONLY (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.  If display is set to DISPLAY_ONLY , elements are not added to the open segment but are sent to the display device only.  Also, existing elements may not be edited using the replace_ele command.  This mode may be used to avoid repeated close_segment and open_segment calls while commands are being sent to the display.  Elements may be read from the segment, executed, and deleted when display is set to DISPLAY_ONLY . 

ERRORS

1 Graphics device is not initialized for this operation. 

SEE ALSO

inq_open_segment(3G), close_segment(3G). 

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

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