IDirect3DViewport::AddLight

HRESULT AddLight(LPDIRECT3DLIGHT lpDirect3DLight);

Adds the specified light to the list of Direct3DLight objects associated with this viewport.

·Returns D3D_OK if successful, or an error otherwise, which may be one of the following values:

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

lpDirect3DLight

Address of the Direct3DLight object that should be associated with this Direct3DDevice object.