Function gpu_light
#include <macawgpu.h>void gpu_light(
int n,
double x,
double y,
double z,
double w,
double strength,
double radius
);
Sets up one of the eight lights and switches it on. It's placed through the modelview matrix as it is now, so set your camera first. Switch on "lighting" too.
Parameters
nint- Which light, from 0 to 7. Light 0 starts on, as a sun over your left shoulder.
xdouble- The x of the light's place, or of the direction it comes from.
ydouble- The y of its place or direction.
zdouble- The z of its place or direction.
wdouble- 0 for a direction the light comes from, like the sun; 1 for a lamp at x, y, z.
strengthdouble- How bright it is. -1 is the usual: 0.75 for a direction, 1 for a lamp.
radiusdouble- How far a lamp's light reaches, fading out on the way. 0 means it doesn't fade.
In Textures, light and fog, with gpu_bindtexture, gpu_lightoff, gpu_ambient, gpu_shademodel, gpu_material, gpu_fog, gpu_pointsize, gpu_stats.