Return to menu | Go to next page


void
Graphic function

slLight

Light source settings

Format

void slLight(light)
VECTOR light ;

Parameter

light light source vector

Function

Set the light source.
For the parameter, substitute a vector value (unit vector) that indicates the direction of the light source.

Return value

None

Remarks

The light source vector must be specified as a unit vector. BR> If the size of the light source vector exceeds 1, overflow occurs and the polygon surface color is not drawn correctly.
Also, when scaling is performed on the current matrix, the normal vector of the polygon is also affected by this, so the brightness will change accordingly, so be careful.

Reference: Chapter 3 Light Source

slLight


Return to menu | Go to next page