Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Graphics
Direct3D 9
Reference
Direct3D Reference
Interfaces
IDirect3DDevice9
 IDirect3DDevice9::LightEnable

  Switch on low bandwidth view
IDirect3DDevice9::LightEnable
Bb174421.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb174421.XDK_CHM_BANNER_right(en-us,VS.85).jpg

IDirect3DDevice9::LightEnable

Enables or disables a set of lighting parameters within a device.

HRESULT LightEnable(
  DWORD LightIndex,
  BOOL bEnable
);

Parameters

LightIndex
[in] Zero-based index of the set of lighting parameters that are the target of this method.
bEnable
[in] Value that indicates if the set of lighting parameters are being enabled or disabled. Set this parameter to TRUE to enable lighting with the parameters at the specified index, or FALSE to disable it.

Return Values

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

If a value for LightIndex is outside the range of the light property sets assigned within the device, the IDirect3DDevice9::LightEnable method creates a light source represented by a D3DLIGHT9 structure with the following properties and sets its enabled state to the value specified in bEnable.

MemberDefault
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
Falloff 0
Attenuation0 0
Attenuation1 0
Attenuation2 0
Theta 0
Phi 0

Requirements

Header: Declared in D3D9.h.

Library: Use D3D9.lib.

See Also

IDirect3DDevice9::GetLight, IDirect3DDevice9::GetLightEnable, IDirect3DDevice9::SetLight

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker