GsF_LIGHT

Parallel light source

struct GsF_LIGHT {
        long vx, vy, vz;
        u_char r, g, b;
};

Members

vx, vy, vz Light source directional vectors
r, g, b Light colours

Explanation

GsF_LIGHT describes parallel light source information.
It is set by the GsSetFlatLight() function.
Up to three parallel light sources can be set simultaneously.
The light source directional vector is specified by vx, vy, vz.
It is unnecessary for the programmer to perform normalization as this is done by the GsSetFlatLight() function.
A polygon whose normal vectors are opposite to these directional vectors is exposed to the strongest light.
Light source colours are specified in the 8-bit values r, g, b.