|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
Ambient light is surrounding light that radiates from all directions.
An application sets the color of ambient lighting by invoking the IDirect3DMobileDevice::SetRenderStatemethod 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);