[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
The graPHIGS Programming Interface : Subroutine Reference
GPLSR - Set Light Source Representation
GPLSR
(wsid,
index,
type,
color,
data) |
Purpose
Use
GPLSR to store the specified light source
information into the specified entry of the
workstation's light source table.
Each entry of the light source table is initially set to a
light source type of
1=AMBIENT
and light
source direct color values of 1.0, 1.0, and 1.0.
Parameters
wsid -- specified by user, fullword integer
Workstation identifier.
index -- specified by user, fullword integer
Light source table index (>=1)
type -- specified by user, fullword integer
Light source type
(1=AMBIENT, 2=DIRECTIONAL, 3=POSITIONAL, 4=SPOT
)
color -- specified by user, four fullwords of data
Light source color.
This parameter must have one of the following two
formats:
indexed format direct format
------------- -------------
0 | 1| fullword integer 0 | 2| fullword integer
|-----------| |-----------|
4 |color index| fullword integer 4 |component 1| short floating-point number
|-----------| |-----------|
8 | ignored| fullword integer 8 |component 2| short floating-point number
|-----------| |-----------|
12 | ignored| fullword integer 12 |component 3| short floating-point number
------------- -------------
data -- specified by user,
array of short floating-point numbers
Light source type dependent data.
Required data for each light source type is listed below.
They must be specified in the order shown in the list:
1=AMBIENT
none
2=DIRECTIONAL
Light source direction -
3 short floating-point numbers (WC)
3=POSITIONAL
Light source position -
3 short floating-point numbers (WC)
Attenuation coefficients -
2 short floating-point numbers.
The first floating-point number must be >0.
The second floating-point number must be >=0.
4=SPOT
Light source position -
3 short floating-point numbers (WC)
Light source direction -
3 short floating-point numbers (WC)
Concentration exponent - short floating-point number
(>=0)
Attenuation coefficients - 2 short floating-point numbers.
The first floating-point number must be >0.
The second floating-point number must be >=0.
Spread angle - short floating-point number.
The spread angle must be in radians
(0.0<=angle<=[default])
Error Codes
- 25
- SPECIFIED WORKSTATION DOES NOT EXIST
- 35
- WORKSTATION HAS ONLY INPUT CAPABILITIES
- 92
- COLOR INDEX < ZERO
- 93
- COLOR INDEX VALUE(S) EXCEED WORKSTATION TABLE CAPACITY
- 96
- COLOR PARAMETER OUT OF RANGE FOR CURRENT COLOR MODEL
- 97
- COLOR FORMAT PARAMETER IS INVALID
- 254
- LIGHT SOURCE INDEX < ONE
- 255
- LIGHT SOURCE INDEX EXCEEDS THE WORKSTATION TABLE CAPACITY
- 258
- SPECIFIED LIGHT SOURCE TYPE IS NOT SUPPORTED
- 259
- ONE OF LIGHT SOURCE PARAMETERS IS INVALID
Related Subroutines
- GPCML
- Set Color Model
- GPLMO
- Set Lighting Calculation Mode
- GPLSS
- Set Light Source State
- GPQLSF
- Inquire Light Source Facilities
- GPQLSR
- Inquire Light Source Representation
RCP code
201329422
(X'0C000B0E')
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]