Microsoft DirectX 9.0

IDirect3DDevice9::SetLight Method

Assigns a set of lighting properties for this device.


HRESULT SetLight(      

    DWORD Index,     CONST D3DLIGHT9 *pLight );


[in] 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 pLight.
[in] Pointer to a D3DLIGHT9 structure, containing the lighting parameters to set.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

See Also

IDirect3DDevice9::GetLight, IDirect3DDevice9::GetLightEnable, IDirect3DDevice9::LightEnable

© 2002 Microsoft Corporation. All rights reserved.