Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.SetLight

Assigns a set of lighting properties for this device.

object.SetLight( _ 
    Index As Long, _ 
    Light As D3DLIGHT8)

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
Index
Zero-based index of the set of lighting properties to set. If a set of lighting properties exists at this index, it is overwritten by the new properties specified in Light.
Light
A D3DLIGHT8 type, containing the lighting-parameters to set.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

See Also

Direct3DDevice8.GetLight, Direct3DDevice8.GetLightEnable, Direct3DDevice8.LightEnable