GPDMR (wsid, index, method, mdata, clengths, ctype, cdata) |
Purpose
Use GPDMR to set the specified data mapping values into the specified entry of the data mapping table.
The data mapping representation provides the values that the graPHIGS API uses to perform data mapping on area primitives. The entry used is selected by the data mapping index specified by Set Data Mapping Index (GPDMI) or Set Back Data Mapping Index (GPBDMI) .
During traversal, if the data mapping method is inconsistent with the contents of the primitive, then the graPHIGS API renders the primitive using data mapping method 1=DM_METHOD_COLOR
If the method parameter has the value 1=DM_METHOD_COLOR , then you do not need to supply any additional data mapping data: the graPHIGS API ignores the values in the parameters following the method parameter.
The data mapping table is zero-based; however, entry zero cannot be changed. Entry zero always contains a data mapping method of 1=DM_METHOD_COLOR Use GPQWDT to inquire the data mapping facilities of a specific workstation.
See The graPHIGS Programming Interface: Understanding Concepts for more detailed information.
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 ---------------------
If data organization format selected is 2=SQUARE_MM or 3=RECT_MM , then x_size and y_size must be powers of 2.
--------------------- WORD 1 | 'n_ent' | Fullword Integer ---------------------
--------------------- WORDS 1 | 'n_lists' | Fullword integer |-------------------| 2n | 'n_ent' | n_lists * Z Z Fullword integer | | ---------------------
Alpha = X'FF' [default] (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). During traversal, these values override the current transparency coefficient. See GPTCO for more information.
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 3 and Figure 4 The number of color values in each 2=SINGLE_VALUE_UNIFORM color list is given by n_ent
Figure 3. SINGLE_VALUE_UNIFORM Color Data Organization
n_ent ------------------ | -------------> | ------------------ --+----------------+--> | | lolim hilim U Data Value
The number of color values in each of the 4=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_ent[1] + n_ent[2] + n_ent[3] + ... + n_ent[n_lists])
Figure 4. BI-VALUE_UNIFORM Color Data Organization
^ | n_lists vhilim + ------------------------------ | | ^ | ^ |-^-| ^ | | ^ | ^ | | |-|-| | |-|-| | | | | | | | | | | |-|-|-|-| | | |-|-| | | | | | | | |-|-| | | | | | | | V Data | |-|-| | |-|-| | | | | | | | n_ent[i] 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 5 The number of color values in this array is
(x_size * y_size)
Figure 5. 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 6 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 6. IMAGE_ARRAY SQUARE_DATA 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 7 The number of color values in this complete array is
((2 * x_size) - 1) * ((2 * y_size) - 1)
Figure 7. IMAGE_ARRAY RECT_DATA 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
Related Subroutines
RCP code
201345543 (X'0C004A07')