Share via


Ambient Lighting State (Windows CE 5.0)

Send Feedback

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

Render States

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.