light_switch(3G)
NAME
light_switch − enable/disable light sources
SYNOPSIS
C Syntax:
void light_switch ( fildes, on );
int fildes, on;
FORTRAN77 Syntax:
subroutine light_switch ( fildes, on )
integer*4 fildes, on
Pascal Syntax:
procedure light_switch ( fildes, on:integer );
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
on Mask specifying which light sources are on (value range: 0 through 65535 for all 3-D devices which support lighting).
Discussion
light_switch allows the point light sources and the ambient light source to be turned on and off independently. The bits in the on mask determine the state of each light source. The least significant bit (bit 0) specifies the ambient light, while bits 1 through 15 determine the state of point light sources 1 through 15 respectively. If a bit is set (1) the corresponding light source is on; if a bit is clear (0) the light source is off.
The number of light sources is device-dependent. Currently fifteen (15) light sources are supported on all 3-D devices which support lighting.
DEFAULTS
on = 1: ambient light source is on if shading active.
SEE ALSO
Starbase Reference: light_ambient(3G), light_source(3G), shade_mode(3G), surface_model(3G), vertex_format(3G). Starbase Graphics Techniques.
Hewlett-Packard Company — November 03, 1994