void PEXOCCSetLightSourceState( PEXOCC context, unsigned int enable_count, PEXTableIndex *enable, unsigned int disable_count, PEXTableIndex *disable )
void PEXSetLightSourceState( Display *display, XID resource_id, PEXOCRequestType req_type, unsigned int enable_count, PEXTableIndex *enable, unsigned int disable_count, PEXTableIndex *disable )
None.
Invoke PEXOCCSetLightSourceState to create an attribute output command which modifies the light source state attribute in the renderer's pipeline state.
If the pipeline's state surface reflection model or back-facing surface reflection model is any value other than PEXRMNone, then lighting is enabled. The light source state maintains a list of indices into the renderer's light table, each of which defines a light, to define which lights are on.
Each element in the enable list activates the light represented by the corresponding light table entry and each element in the disable list deactivates the light represented by the corresponding light table entry.
If you list a light in both the enable list (enable) and the disable list (disable), or specify a light index of zero, then the implementation issues a BadPEXOutputCommand error. If any light in the enable or disable list references an undefined light table entry, then the implementation ignores the light. If you enable more non-ambient lights than the maximum number supported by the implementation in reflectance calculations, then which lights are used is implementation-dependent. Inquire the maximum number of non-ambient lights by invoking the PEXGetImpDepConstants function.
This function is a member of the general surface attribute set.
For an overview and for a list of output attribute functions, see Output Attribute Functions.