dxLightColor(light%,red%,green%,blue%)

Parameters

light - light handle
red# - red value of light
green# - green value of light
blue# - blue value of light

Description

Sets the dxColor of a light.

An r,g,b value of 255,255,255 will brighten anything the light shines on.

An r,g,b value of 0,0,0 will have no affect on anything it shines on.

An r,g,b value of -255,-255,-255 will darken anything it shines on. This is known as 'negative lighting', and is useful for shadow effects.

See also: dxCreateLight, dxLightRange, dxLightConeAngles.

Example

dxGraphics3D 640,480

camera = dxCreateCamera()
dxMoveEntity camera,0,0,-3

ball = dxCreateSphere()

lite = dxCreateLight() ; try different lights 1 to 3
dxMoveEntity lite,5,0,-15
dxPointEntity lite,ball


While Not dxKeyDown(1)
dxRenderWorld:dxFlip
If dxKeyHit(57) Then dxLightColor lite,dxRnd(255),dxRnd(255),dxRnd(255) ; press SPACEBAR to try different light colors
Wend
End

Index