Platform SDK: DirectX |
The Direct3DDevice7.LightEnable method enables or disables a set of lighting parameters within a device.
object.LightEnable( _ LightIndex As Long, _ bEnable As Boolean)
If the method fails, an error is raised and Err.Number is set to an error code. For a complete list of Direct3D Immediate Mode error values and descriptions, see Error Codes.
If you supply a value for LightIndex outside the range of the light property sets currently assigned within the device, the LightEnable method creates a light source with the following properties and sets its enabled state to the value specified in Enable:
Member | Default |
---|---|
dltType | D3DLIGHT_DIRECTIONAL |
dcvDiffuse | (R:1, G:1, B:1, A:0) |
dcvSpecular | (R:0, G:0, B:0, A:0) |
dcvAmbient | (R:0, G:0, B:0, A:0) |
dvPosition | (0, 0, 0) |
dvDirection | (0, 0, 1) |
dvRange | 0 |
dvFalloff | 0 |
dvAttenuation0 | 0 |
dvAttenuation1 | 0 |
dvAttenuation2 | 0 |
dvTheta | 0 |
dvPhi | 0 |
Direct3DDevice7.GetLight, Direct3DDevice7.GetLightEnable, Direct3DDevice7.SetLight, Lighting and Materials