[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: Technical Reference

Chapter 1. General Information for Workstations

This chapter contains two areas pertaining to all workstations supported by the graPHIGS API. The first section, Accessing a Workstation, describes the workstation types and how connection identifiers (CONNIDs : see CONNID [Connection Identifier]) are used by the graPHIGS API when opening a workstation. The second section, Description Tables in the graPHIGS API, provides lists of the initial default values in the graPHIGS API Traversal State List and view table entries in the Workstation View Table Data at initialization.

Accessing a Workstation

In order to display graphical data from an application program, the graPHIGS API requires information about the workstation. The graPHIGS API must know the capabilities and characteristics of the workstation as well as the information to access the workstation using the operating system. This information is identified to the graPHIGS API with the workstation type and connection identifier parameters of the Open Workstation (GPOPWS) and Create Workstation (GPCRWS) subroutines. (See The graPHIGS Programming Interface: Subroutine Reference .)

The final workstation type and connection identifier used by the graPHIGS API are the result of processing the nicknames in the External Defaults File (EDF) or the Application Defaults Interface Block (ADIB) and may differ from the parameters specified on GPOPWS and GPCRWS. See Chapter 7, Controlling the Environment with Defaults and Nicknames.

Workstation Types

Workstations of a certain class that share specific characteristics are referred to as a workstation type. For example, 5080 workstations are of the same type, although each may or may not have certain optional features (such as color capability). However, 5080 workstations are of a different workstation type than NATIVE workstations because of different capabilities.

The workstation category of the user's physical workstation is identified by the workstation type parameter on the Open Workstation (GPOPWS) or Create Workstation (GPCRWS) subroutine call.

The graPHIGS API supports the following workstation types:

Category Workstation Type Parameter Environment
6090 6090 VM/CMS MVS
5080 5080 VM/CMS MVS
GDDM Devices GDDM VM/CMS MVS
GDF Files GDF VM/CMS MVS AIX RS/6000(*)
CGM CGM VM/CMS MVS AIX RS/6000
X X AIX RS/6000
X XSOFT AIX RS/6000
X XDWA AIX RS/6000
PEX XPEX AIX RS/6000
IMAGE files IMAGE AIX RS/6000

When you specify the workstation type parameter on the GPOPWS or GPCRWS subroutine calls, the workstation type is passed as an 8-byte character string, left-justified with blanks padding on the right of the type (example, 'NATIVE ' ).

Refer to Chapter 3, Workstation Description Tables, for information about the supported workstation types.

For information about using nickname processing to pass workstation types to the graPHIGS API, see Chapter 7, Controlling the Environment with Defaults and Nicknames.

The data values of the Workstation Description Table (WDT) describe the capabilities and characteristics of a workstation type. The data values of the WDT are available to your application through the WDT group of inquiries (see The graPHIGS Programming Interface: Subroutine Reference ). The workstation type parameter of the WDT inquiries identifies the category of workstation whose data is requested. (The WDT group of inquiries return only data that does not change during the processing of your application. The WSL group of inquiries return the current state of workstation data values that your application can change.)

When either the Open Workstation (GPOPWS) or Create Workstation (GPCRWS) subroutine calls create a workstation resource, the graPHIGS API creates a new unique workstation type. This created ("realized") workstation type precisely describes the actual capabilities of the created workstation. For example, 5080 workstations may, in general, support the dial input devices. However, a particular 5080 may not have the dials present. The actual WDT will not have an entry for the valuator devices, where the general ("generic") WDT will have such an entry. The actual workstation type is available to your application using the Inquire Realized Workstation Category and Type (GPQRCT) subroutine. You can then use the returned realized workstation type as the wstype parameter on the WDT group of inquiries.

Connection Identifiers

The connection identifier specified on Open Workstation (GPOPWS) and Create Workstation (GPCRWS) subroutines is used by the graPHIGS API to access a specific device for processing. The identifier is passed to the operating system, typically for allocation of the workstation.

For the 6090 the connection identifier is an "*" (asterisk).

For the 5080 in the S/390 environment , the connection identifier must be the DDNAME (MVS) or FILEDEF name (VM) which defines the device you wish to access. On VM, for example, issue the following command prior to running your application:

    FILEDEF IBM5080 GRAF 120
You would specify IBM5080 on GPOPWS or GPCRWS as the connection identifier parameter and the graPHIGS API would attempt to open a 5080 at virtual address 120.

For GDDM (*) supported devices the connection identifier is used as the "name-list" by the graPHIGS API when it issues the GDDM call DSOPEN. (See GDDM Base: Programming Reference for details of the DSOPEN call and the name-list parameter.) For example, specifying a connection identifier of "*" will indicate to GDDM (by passing a name-list of "*") that the user console is to be used as the workstation.

GDDM nickname processing may be performed on the data passed on the DSOPEN call (see GDDM Base: Programming Reference ). The DSOPEN call issued by the graPHIGS API takes the form:

DSOPEN (DEVID, FAM, DEVTOK, 0, 0, NAMEC, NAMEL)
         |      |     |             |      |
         |      |     |             |      name list, the first entry
         |      |     |             |          of which is set equal to
         |      |     |             |          the connection identifier
         |      |     |             name count and is always set to 1
         |      |     GDDM device token (always '*')
         |      GDDM family (always 1)
         [default] encoded device identifier

In the AIX(*) environment, the connection identifier defines the workstation you wish to access.

For information about using nickname processing to pass connection identifiers to the graPHIGS API, see Chapter 7, Controlling the Environment with Defaults and Nicknames.

For further information about the connection identifier passed when generating GDF files, CGM files, or IMAGE files, see The GDF Workstation, The CGM Workstation, or The IMAGE Workstation.

Description Tables in the graPHIGS API

This section contains two tables:

The data types of the returned values are identified by the following codes:

Data Type Definition
I Integer A whole number
R Real A floating-point number
S String A character string
E Enumeration A data type comprised of a set of values. The set is defined by enumerating the identifiers denoting the values.
n Quantity This specifies an undesignated quantity of data.
Note: The notation of n (number) [default] t (data type) indicates a collection of data of that type. This can be indicated in one of two ways:
  1. by using notation such as 3[default]R (three real numbers), which could specify something like the x, y, and z coordinates of a three-dimensional point or RGB values
  2. by using a variable number such as n[default]I, which specifies a collection of n integers.

The values identified with the symbol * reflect the default value of a workstation configuration variable; that is, this may not be the actual workstation value after the workstation is opened. (See The graPHIGS Programming Interface: Understanding Concepts for a discussion of workstations.)

The graPHIGS API Traversal State List


Table 1. The graPHIGS API Traversal Defaults Table

Description Data Type Default Value
Annotation height scale factor R 1.0
Annotation path (1=RIGHT, 2=LEFT, 3=UP, 4=DOWN ) E 1=RIGHT
Annotation text alignment:
Horizontal
   (1=NORMAL,
    2=LEFT_ALIGN,
    3=CENTER,
    4=RIGHT_ALIGN)
E 1=NORMAL
Vertical
     (1=NORMAL,
    2=TOP,
    3=CAP,
    4=BASE,
    5=BOTTOM
)
E 1=NORMAL
Annotation up vector 2[default]R 0.0, 1.0
Antialiasing identifier
  (1=NONE, 2=PERFORM )
I 1=NONE
Back data modification matrix 3[default]3[default]R 1.0, 0.0, 0.0 0.0, 1.0, 0.0 0.0, 0.0, 1.0
Back interior color index 3[default]R See note*
Back interior color source type E VERTEX
Back specular color 3[default]R See note
Back surface properties:
   Ambient reflection coefficient R 1.0
   Diffuse reflection coefficient R 1.0
   Specular reflection coefficient R 1.0
   Specular reflection exponential R 0.0
   Transparency coefficient R 0.0
Character base vector 2[default]R 1.0, 0.0
Character expansion factor R 1.0
Character height R 0.01
Character line scale factor R 1.0
Character positioning mode (1=CONSTANT, 2=PROPORTIONAL ) I 1=CONSTANT
Color processing mode index I 0
Character spacing R 0.0
Character up vector 2[default]R 0.0, 1.0
Class set names, number of I 0
Curve approximation criteria:
  (1=WS_DEPENDENT,
   2=CONSTANT_SUBDIVISION_BETWEEN_KNOTS,
   3=VARIABLE_SUBDIVISION_BETWEEN_KNOTS
)
I 1=WS_DEPENDENT
   Control value R 1.0
Data filtering for data mapping
   Magnification data filtering method (1=SAMPLE_IN_BASE,    2=INTERP_IN_BASE ) E 1=SAMPLE_IN_BASE
Minification data filtering method
  (1=SAMPLE_IN_BASE,
   2=INTERP_IN_BASE,
   3=SAMPLE_IN_SQUARE_MM,
   4=SAMPLE_IN_AND_INTERP_BTWN_SQUARE_MM
   5=INTERP_IN_SQUARE_MM,
   6=INTERP_IN_AND_BTWN_SQUARE_MM,
   7=SAMPLE_IN_RECT_MM,
   8=SAMPLE_IN_AND_INTERP_BTWN_RECT_MM,
   9=INTERP_IN_RECT_MM)
E 1=SAMPLE_IN_BASE
u-dimension bounding method
  (1=CLAMP,
   2=REPEAT
)
E 1=CLAMP
   v-dimension bounding method
  (1=CLAMP,
   2=REPEAT
)
E 1=CLAMP
Data mapping method
  (-1=IMAGE_ARRAY,
   1=DM_METHOD_COLOR,
   2=SINGLE_VALUE_UNIFORM,
   4=BI_VALUE_UNIFORM
)
E 1=DM_METHOD_COLOR
Data mapping table index I 0
Data modification matrix 3[default]3[default]R 1.0, 0.0, 0.0 0.0, 1.0, 0.0 0.0, 0.0, 1.0
Data morphing
   Data morphing scale factors n[default]R {1.0}
   Data morphing scale factors, number of I 1
Default attribute source flag items:
   Polyline line type (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Polyline line width scale factor (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Polyline color (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Marker type (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Marker size scale factor (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Polymarker color (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Text font (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Text precision (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Text color (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Character expansion factor (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Character spacing (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Interior style (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Interior style index (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Interior color (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Edge flag (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Edge line type (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Edge line width scale factor (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
   Edge color (1=BUNDLED, 2=INDIVIDUAL ) E 2=INDIVIDUAL
Depth cue index I 0
Destination blending function (1=DSTBF_ZERO, 2=DSTBF_ONE, 3=DSTBF_SRC_ALPHA, 4=DSTBF_ONE_MINUS_SRC_ALPHA, 5=DSTBF_DST_ALPHA, 6=DSTBF_ONE_MINUS_DST_ALPHA, 7=DSTBF_DST_COLOR, 8=DSTBF_ONE_MINUS_SRC_COLOR ) E 4=DSTBF_ONE_MINUS_    SRC_ALPHA
Edge bundle table index I 1
Edge color 3[default]R See note
Edge flag (1=OFF, 2=ON, 3=GEOMETRY_ONLY ) E 1=OFF
Edge line type I 1=SOLID
Edge line width scale factor R 1.0
Face distinguish mode (1=NONE, 2=COLOR_SURFACE_PROPERTIES ) I 1=NONE
Face lighting method (1=FACE_INDEPENDENT, 2=FACE_DEPENDENT ) E 1=FACE_INDEPENDENT
Frame buffer comparison:
   Operation (1=NO_OPERATION,    2=WRITE_WHEN_EQUAL,    3=WRITE_WHEN_NOT_EQUAL ) E 1=NO_OPERATION
   Mask I N/A
   Comparison value I N/A
Frame buffer write protect mask I 0
Geometric Text Alignment:
   Horizontal (1=NORMAL, 2=LEFT_ALIGN, 3=CENTER,    4=RIGHT_ALIGN ) E 1=NORMAL
   Vertical (1=NORMAL, 2=TOP, 3=CAP, 4=BASE, 5=BOTTOM ) E 1=NORMAL
Geometric text path (1=RIGHT, 2=LEFT, 3=UP, 4=DOWN ) E 1=RIGHT
Global modeling transformations 4[default]4[default]R 1.0, 0.0, 0.0, 0.0 0.0, 1.0, 0.0, 0.0 0.0, 0.0, 1.0, 0.0 0.0, 0.0, 0.0, 1.0
Highlighting color 3[default]R See note
HLHSR (hidden line, hidden surface removal identifier) (1=VISUALIZE_IF_NOT_HIDDEN, 2=VISUALIZE_IF_HIDDEN, 3=VISUALIZE_ALWAYS, 4=NOT_VISUALIZE, 5=FACE_DEPENDENT_VISUALIZATION, 6=NO_UPDATE, 7=GREATER_THAN, 8=EQUAL_TO, 9=LESS_THAN, 10=NOT_EQUAL, 11=LESS_THAN_OR_EQUAL_TO ) I 1=VISUALIZE_IF_NOT_HIDDEN
Interior bundle table index I 1
Interior color 3[default]R See note
Interior color source type E VERTEX
Interior shading method (1=SHADING_NONE, 2=SHADING_COLOR, 3=SHADING_DATA ) E 2=SHADING_COLOR
Interior style (1=HOLLOW, 2=SOLID, 3=HATCH, 4=PATTERN, 5=EMPTY ) E 1=HOLLOW
Interior style index I 1
Label identifier I 0
Light color source type E VERTEX
Light source state:
   Number of light sources I 0
   List of active light sources E N/A
Lighting calculation mode (1=NONE, 2=PER_AREA, 3=PER_VERTEX ) E 1=NONE
Line type I 1=SOLID_LINE
Line width scale factor R 1.0
Local modeling transformations 4[default]4[default]R 1.0, 0.0, 0.0, 0.0 0.0, 1.0, 0.0, 0.0 0.0, 0.0, 1.0, 0.0 0.0, 0.0, 0.0, 1.0
Marker size scale factor R 1.0
Marker type I 3=ASTERISK
Modeling clipping indicator (1=NOCLIP, 2=CLIP ) E 1=NOCLIP
Parametric surface characteristics (1=NONE, 2=ISOPARAMETRIC_LINES ) E 1=NONE
Pick identifier I 0
Polygon culling (1=NONE, 2=BACK, 3=FRONT ) I 1=NONE
Polyhedron edge culling mode (1=NONE, 2=BOTH_BACK, 3=BOTH_FRONT, 4=BOTH_BACK_OR_BOTH_FRONT, 5=BACK_AND_FRONT, 6=LEAST_ONE_BACK, 7=LEAST_ONE_FRONT ) I 1=NONE
Polyline bundle table index I 1
Polyline color 3[default]R See note
Polyline end type (1=FLAT, 2=ROUND, 3=SQUARE ) E 1=FLAT
Polyline shading method (1=POLYLINE_SHADING_NONE, 2=POLYLINE_SHADING_COLOR ) E 1=POLYLINE_SHADING_NONE
Polymarker bundle table index I 1
Polymarker color 3[default]R See note
Reflectance model (1=REFLECTANCE_NONE, 2=AMB, 3=AMB_DIFF, 4=AMB_DIFF_SPEC ) E 1=REFLECTANCE_NONE
Source blending function (1=SRCBF_ZERO, 2=SRCBF_ONE, 3=SRCBF_SRC_ALPHA, 4=SRCBF_ONE_MINUS_SRC_ALPHA, 5=SRCBF_DST_ALPHA, 6=SRCBF_ONE_MINUS_DST_ALPHA, 7=SRCBF_DST_COLOR, 8=SRCBF_ONE_MINUS_DST_COLOR, 9=SRCBF_MIN_SRC_ALPHA_ONE_MINUS_DST_ALPHA ) E 3=SRCBF_SRC_ALPHA
Specular color 3[default]R See note
Surface approximation criteria:
   Criteria (1=WS_DEPENDENT,    2=CONSTANT_SUBDIVISION_BETWEEN_KNOTS,    3=VARIABLE_SUBDIVISION_BETWEEN_KNOTS ) I 1=WS_DEPENDENT
   Control value 2[default]R 1.0, 1.0
Surface properties:
   Ambient reflection coefficient R 1.0
   Diffuse reflection coefficient R 1.0
   Specular reflection coefficient R 1.0
   Specular reflection exponential R 0.0
   Transparency coefficient R 0.0
Text bundle table index I 1
Text Color 3[default]R See note
Text font I 1
Text precision (1=STRING_PREC, 2=CHAR_PREC, 3=STROKE_PREC ) E 1=STRING_PREC
Transparency coefficient R 0.0
Trimming curve approximation criteria:
   Criteria (1=WS_DEPENDENT,    2=CONSTANT_SUBDIVISION_BETWEEN_KNOTS,    3=VARIABLE_SUBDIVISION_BETWEEN_KNOTS ) I 1=WS_DEPENDENT
   Control value 3[default]R 1.0, 1.0, 1.0
Vertex morphing
   Vertex morphing scale factors n[default]R {1.0}
   Vertex morphing scale factors, number of I 1
View index I 0
Z-buffer protect mask I 0
*Note: The default color is the color value contained in entry 1 of the rendering color table.

Workstation View Table Data

When a workstation is opened with Open Workstation (GPOPWS) or Create Workstation (GPCRWS), a Workstation State List (WSL) is created. The WSL is initialized from information in the actual Workstation Description Table (WDT) that is modified to reflect the capabilities of the specific workstation to be used. The workstation transformation values and the view table in the WSL are initialized to the following values. The right-hand column lists the appropriate inquiry subroutine and parameter.

Table 2. WSL View Parameters at Initialization

Description Data Type Default Value Inquiry
   Workstation window 6[default]R 0.0, 1.0, 0.0, 1.0, 0.0, 1.0  
   Workstation viewport 6[default]R 0.0, WVX, 0.0, WVY, 0.0, WVZ  
Note: For a square display surface, WVX, WVY, and WVZ are the maximum device coordinate values in the x, y, and z directions. For a non-square display surface, the largest square portion of the display surface in the lower left corner is used.
View Table Entry Values
   Viewing transformation matrix 16[default]R 1.0, 0.0, 0.0, 0.0 0.0, 1.0, 0.0, 0.0 0.0, 0.0, 1.0, 0.0 0.0, 0.0, 0.0, 1.0 GPQCVR [Group 18, 19]
   View Mapping Matrix 4[default]4[default]R 1.0, 0.0, 0.0, 0.0 0.0, 1.0, 0.0, 0.0 0.0, 0.0, 1.0, 0.0 0.0, 0.0, 0.0, 1.0 GPQCVR [Group 22, 23]
   Window 4[default]R -1.0, 1.0, -1.0, 1.0 GPQCVR [Group 16, 17]
   Viewport 6[default]R 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 GPQCVR [Group 14, 15]
   Projection reference point 3[default]R 0.0, 0.0, 1.0 GPQCVR [Group 16, 17]
   View plane distance R 0.0 GPQCVR [Group 16, 17]
   Near plane distance R 1.0 GPQCVR [Group 16, 17]
   Far plane distance R 0.0 GPQCVR [Group 16, 17]
   Projection type (1=PARALLEL,    2=PERSPECTIVE ) E 1=PARALLEL  
   Window clipping indicator    (1=OFF, 1=ON ) E 2=ON GPQCVR [Group 1]
   Far clipping indicator (1=OFF,    2=ON ) E 2=ON GPQCVR [Group 3]
   Near clipping indicator (1=OFF,    2=ON ) E 2=ON GPQCVR [Group 2]
   Shielding color type    (1=INDEXED, 2=DIRECT ) E 1=INDEXED GPQCVR [Group 3]
   Shielding color I or 3[default]R 0 GPQCVR [Group 5]
   Shielding indicator (1=OFF, 2=ON ) E 1=OFF GPQCVR [Group 4]
   View border color type    (1=INDEXED, 2=DIRECT ) E 1=INDEXED GPQCVR [Group 7]
   View border color I or 3[default]R 1 GPQCVR [Group 7]
   View border indicator (1=OFF,    2=ON ) E 1=OFF GPQCVR [Group 6]
View Active Flag for Input
   For view 0 (1=INACTIVE,    2=ACTIVE ) E 1=ACTIVE GPQCVR [Group 20]
   For all other views    (1=INACTIVE,    2=ACTIVE ) E 1=INACTIVE GPQCVR [Group 20]
View Active Flag for Output
   For view 0 (1=INACTIVE,    2=ACTIVE ) E 2=ACTIVE GPQCVR [Group 21]
   For all other views    (1=INACTIVE, 2=ACTIVE ) E 1=INACTIVE GPQCVR [Group 21]
Temporary view indicator (1=OFF, 2=ON ) E 1=OFF GPQCVR [Group 9]
HLHSR (hidden line, hidden surface removal) mode (1=OFF, 2=ON_THE_FLY ) E 1=OFF GPQCVR [Group 10]
Transparency mode (1=OFF, 2=PARTIAL_TRANSPARENT, 3=BLEND, 4=BLEND_ALL ) E 1=OFF GPQCVR [Group 11]
Antialiasing mode (1=OFF, 2=SUBPIXEL_ON_THE_FLY, 3=NON_SUBPIXEL_ON_THE_FLY ) E 1=OFF GPQCVR [Group 24]
Initial color processing index I 0 GPQCVR [Group 12]
Initial frame buffer write protect mask I 0 GPQCVR [Group 13]
Shield alpha value I 255 GPQCVR [Group 25]

[ Previous | Next | Contents | Glossary | Home | Search ]