Platform SDK: DirectX

Direct3DDevice7.SetLight

The Direct3DDevice7.SetLight method assigns a set of lighting properties for this device.

object.SetLight( _ 
    LightIndex As Long, _ 
    Light As D3DLIGHT7) 

Parameters

object
Object expression that resolves to a Direct3DDevice7 object.
LightIndex
Zero-based index of the set of lighting properties to be set. If a set of lighting properties already exists at this index, it will be overwritten by the new properties.
Light
A D3DLIGHT7 type that contains the lighting parameters to be set.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following values:

DDERR_INVALIDPARAMS
DDERR_OUTOFMEMORY

See Also

Direct3DDevice7.GetLight, Direct3DDevice7.GetLightEnable, Direct3DDevice7.LightEnable , Lighting and Materials.