IDirect3DMobileDevice::LightEnable (Windows CE 5.0)
This method enables or disables a set of lighting parameters within a device.
HRESULT LightEnable( DWORD Index, BOOL Enable );
- [in] A DWORD value containing the light index for the light to be turned on or off.
Setting this parameter to a light index that has not yet been used causes the Direct3D Mobile middleware to create a point light located at (0, 0, 0) with all color parameters set to 0xFFFFFFFF (white).
- [in] A BOOL value that specifies whether the light should be turned on or turned off. Set this value to TRUE to turn the light on or FALSE to turn the light off.
If the method succeeds, the return value is D3DM_OK (see D3DM Values).
If the method fails, the return value can be D3DMERR_INVALIDCALL (see D3DMERR Values).
If a value for Index is outside the range of the light property sets assigned within the device, the IDirect3DMobileDevice::LightEnable method creates a light source represented by a D3DMLIGHT structure with the following properties and sets its enabled state to the value specified in Enable.
|Diffuse||(R:1, G:1, B:1, A:0)|
|Specular||(R:0, G:0, B:0, A:0)|
|Ambient||(R:0, G:0, B:0, A:0)|
|Position||(0, 0, 0)|
|Direction||(0, 0, 1)|
OS Versions: Windows CE 5.0 and later.
Link Library: D3dm.lib, D3dmguid.lib.
Send Feedback on this topic to the authors