次の方法で共有


IDirect3DMobileDevice::LightEnable (Windows Embedded CE 6.0)

1/6/2010

This method enables or disables a set of lighting parameters within a device.

Syntax

HRESULT LightEnable(
  DWORD Index,
  BOOL Enable
);

Parameters

  • Index
    [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).

  • Enable
    [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.

Return Value

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).

Remarks

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.

Member Default

Type

D3DLIGHT_DIRECTIONAL

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)

Range

0

Attenuation0

0

Attenuation1

0

Attenuation2

0

Requirements

Header d3dm.h
Library D3dm.lib, D3dmguid.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IDirect3DMobileDevice
D3DMLIGHT