?/TD>
Microsoft DirectX 9.0

IDirect3DDevice9::GetLight Method


Retrieves a set of lighting properties that this device uses.

Syntax

HRESULT GetLight(      

    DWORD Index,     D3DLIGHT9 *pLight );

Parameters

Index
[in] Zero-based index of the lighting property set to retrieve. This method will fail if a lighting property has not been set for this index by calling the IDirect3DDevice9::SetLight method.
pLight
[out] Pointer to a D3DLIGHT9 structure that is filled with the retrieved lighting-parameter set.

Return Value

If the method succeeds, the return value is D3D_OK.

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



Remarks

This method will not return device state for a device that is created using D3DCREATE_PUREDEVICE. If you want to use this method, you must create your device with any of the other values in D3DCREATE.

See Also

IDirect3DDevice9::SetLight, IDirect3DDevice9::GetLightEnable, IDirect3DDevice9::LightEnable


© 2002 Microsoft Corporation. All rights reserved.