Share via


IDirect3DMobileDevice::SetLight

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method is used to adjust the properties of a light or create a new light.

Syntax

HRESULT SetLight(
  DWORD Index,
  CONST D3DMLIGHT* pLight,
  D3DMFORMAT Format
);

Parameters

  • Index
    [in] A DWORD value containing the index value of the light that will be affected by this call. Setting this parameter to an index number that has not previously been defined will cause the Direct3D Mobile middleware to create a new light.
  • pLight
    [in] A pointer to a D3DMLIGHT structure that contains the data for the affected light.
  • Format
    [in] A D3DMFORMAT value that identifies whether the data in structure pointed to by pLight is in floating point or fixed point format. This parameter must be set to either D3DMFMT_D3DMVALUE_FLOAT or D3DMFMT_D3DMVALUE_FIXED

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

Requirements

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

See Also

Reference

IDirect3DMobileDevice
D3DMLIGHT
D3DMFORMAT