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

GPLSS - Set Light Source State

GPLSS (nact, act, ndea, dea)

Purpose

Use GPLSS to insert a Set Light Source State structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Set Light Source State structure element depending on the current edit mode.

This structure element specifies a list of light source indexes to be added to the current light source state and a list of light source indexes to be deleted from the current light source state. Each index points to an entry in the workstation's light source table. Each table entry contains the set of characteristics of a light source that the graPHIGS API uses at structure traversal time to calculate lighting effects. The characteristics include light source type, light source color, and some light source dependent parameters.

If a light source index in the activation list already exists in the current light source state, it is ignored. If a light source index in the deactivation list does not exist in the current light source state, it is ignored. If the workstation does not support the light source index, then the graPHIGS API ignores the light source index.

The traversal default for light source state is no light sources (an empty list)

Parameters

nact -- specified by user, fullword integer

Number of light sources to be added to the current light source state (>=0)

act -- specified by user, array of fullword integers

Light source indexes to be added to the current light source state (>=1)

ndea -- specified by user, fullword integer

Number of light sources to be deleted from the current light source state (>=0)

dea -- specified by user, array of fullword integers

Light source indexes to be deleted from the current light source state (>=1)

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
116
NUMBER OF LIGHT SOURCE INDEXES < ZERO
254
LIGHT SOURCE INDEX < ONE
256
ACTIVATE LIST AND DEACTIVATE LIST ARE NOT DISJOINT

Related Subroutines

GPBSPR
Set Back Surface Properties
GPLMO
Set Lighting Calculation Mode
GPLSR
Set Light Source Representation
GPSPR
Set Surface Properties

RCP code

201343490 (X'0C004202')


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