Share via


Ambient Lighting State (Windows Embedded CE 6.0)

1/6/2010

Ambient light is surrounding light that radiates from all directions.

For specific information on how Microsoft® Direct3D® Mobile uses ambient light, see Direct Light vs. Ambient Light, and Lighting Equations.

An application sets the color of ambient lighting by invoking the IDirect3DMobileDevice::SetRenderState method and passing the enumerated value D3DMRS_AMBIENT as the first parameter, see D3DMRENDERSTATETYPE. The second parameter is a color value. The default value is zero.

// This code example assumes that d3dmDevice is a
// valid pointer to an IDirect3DMobileDevice interface.
 
// Set the ambient light.
d3dmDevice->SetRenderState(D3DMRS_AMBIENT, 0x00202020);

See Also

Concepts

Render States