GPQDMR (wsid, index, lclengths, lcdata, errind, method, mdata, clengths, ctype, cdata) |
Note:
This subroutine is a Workstation State List (WSL) inquiry. For an overview, see "WSL Inquiries"
Purpose
Use GPQDMR to inquire the current values in the specified entry of the workstation's data mapping table.
If the inquired information is available, then the graPHIGS API sets the error indicator to zero and returns the values in the output parameters. If the error indicator is 533 (an output parameter is not large enough to hold the requested data), then the values up to the length specified are returned. If the inquired information is unavailable, then the error indicator (errind) contains an error number indicating the reason, and the values returned in the output parameters are unpredictable.
If the method parameter has the value 1=DM_METHOD_COLOR , then the graPHIGS API returns no additional data in the remaining parameters.
The data mapping table is 0 based; entry 0 always contains a data mapping method of 1=DM_METHOD_COLOR
Parameters
--------------------- WORDS 1 | 'udindex' | Fullword integer |-------------------| 2 | 'vdindex' | Fullword integer |-------------------| 3 | 'ulolim' | Floatingpoint number |-------------------| 4 | 'uhilim' | Floatingpoint number |-------------------| 5 | 'vlolim' | Floatingpoint number |-------------------| 6 | 'vhilim' | Floatingpoint number ---------------------
--------------------- WORDS 1 | 'dindex' | Fullword integer |-------------------| 2 | 'lolim' | Floatingpoint number |-------------------| 3 | 'hilim' | Floatingpoint number ---------------------
--------------------- WORDS 1 | 'x_size' | Fullword integer |-------------------| 2 | 'y_size' | Fullword integer |-------------------| 3 | 'oformat' | Fullword integer ---------------------
--------------------- WORD 1 | 'n_ent' | Fullword Integer ---------------------
--------------------- WORDS 1 | 'n_lists' | Fullword integer |-------------------| 2-n | 'n_ent' | n_lists * Z Z Fullword integer | | ---------------------
Alpha=X'FF' x (1.0-transparency_coefficient)
(Alpha=X'00') is fully transparent and equivalent to (transparency_coefficient=1.0). (Alpha=X'FF') is fully opaque and equivalent to (transparency_coefficient=0.0).
The 2=SINGLE_VALUE_UNIFORM and 4=BI_VALUE_UNIFORM color lists are supplied from the lolim lower limits to the hilim upper limits. For example, the color representing the data value lolim is first in each list, and the color representing hilim is last. See Figure 8 and Figure 9 The number of color values in each SINGLE_VALUE_UNIFORM color list is given by n_ent
Figure 8. SINGLE_VALUE_UNIFORM Color Data Organization
n_ent --------------- | ----------> | --------------- -+-------------+--> lolim hilim U Data Value
The number of color values in each of the BI_VALUE_UNIFORM color lists is specified by n_ent[i], so that the total number of color values in this color array is
(n_ent1 + n_ent2, + n_ent3 + ... + n_entn_lists )
Figure 9. BI-VALUE_UNIFORM Color Data Organization
| n_lists vhilim + -------------------------------- | | ^ | ^ |-^-| ^ | | ^ | ^ | | |-|-| | |-|-| | | | | | | | | | | |-|-|-|-| | | |-|-| | | | |-|-| | |-|-| | | | | | | | V Data | | | | | |-|-| | | | | | | | n_entii Value | |-|-|-|-|-|-|-|-| ---> |-|-|-|-| | | | | | |-|-| | | | | | | | | |-|-| | |-|-| | | | | | | | | | | |-|-|-|-| | | |-|-| | | | |-|-| | |-|-| | | | | | | | | | | | | |-|-| | | | | | | | vlolim + -------------------------------- -+------------------------------+--> ulolim uhilim U Data Value
The IMAGE_ARRAY color arrays are organized according to the oformat field of the clengths parameter. BASE_DATA array color data is supplied in row order left-to-right and bottom-to-top. See Figure 10 The number of color values in this array is
(x_size * y_size)
Figure 10. IMAGE_ARRAY BASE_DATA Color Data Organization
^ | x_size vhilim + ----------------- | | -----------> | | | ^ | V Data | | | | Value | | | | y_size | | | | | -----------> | | | -----------> | vlolim + ----------------- -+---------------+--> ulolim uhilim U Data Value
SQUARE_MM color mipmap data is supplied in the same fashion, starting with the base image and continuing with each successively smaller mipmap image, until either x_size or y_size is equal to one. See Figure 11 The number of color values in this complete array is
(x_size * y_size) + (x_size * y_size)/4 + (x_size * y_size)/16 + ...which reduces to the integer portion of
((4 * x_size * y_size) - (MAX(x_size,y_size) / MIN(x_size,y_size))) / 3
Figure 11. IMAGE_ARRAY SQUARE_MM Color Data Organization
--- | | -------- | | x_size/2 | | (etc) -------------- | ----> | | ^ | y_size/2 ^ | | | | x_size | ----> | vhilim + ------------------------- | | -----------> | | | ^ | V Data | | | | Value | | | | y_size | | | | | -----------> | | | -----------> | vlolim + ----------------- +---------------+---> ulolim uhilim U Data Value
RECT_MM color mipmap data is supplied as a complete set, and organized in row order left-to-right and bottom-to-top (as though the entire set of mipmap images constituted a single base texture image). See Figure 12 The number of color values in this complete array is
((2 * x_size) - 1) * ((2 * y_size) - 1)
Figure 12. IMAGE_ARRAY RECT_MM Color Data Organization
x_size x_size/2 (etc) ------------------------------- |--------------|---------|---|-| | ^ | | | | (etc) |-----------|--|---------|---|-| ^ | | | | | | | | | | | | y_size/2 | | -------------|---------|---> | vhilim + |--------------|---------|---|-| | | -------------|---------|---> | | | ^ | | | | V Data | | | | | | | Value | | | | | | | y_size | | | | | | | | -------------|---------|---> | | | -------------|---------|---> | vlolim + -------------------------------- | +--------------+---> ulolim uhilim U Data Value
Error Codes
None
Related Subroutines
RCP code
201339159 (X'0C003117')