Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ light_switc(3G) — HP-UX 9.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

light_ambient(3G)

light_source(3G)

shade_mode(3G)

surface_model(3G)

vertex_format(3G)

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 511 for the HP 98721 device. 0 through 65535 for other 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 eight (8) light sources are supported on an HP98721 device, and fifteen (15) light sources are supported on all other 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  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026