Partager via


Shading State (Windows Embedded CE 6.0)

1/6/2010

Microsoft® Direct3D® Mobile supports both flat and Gouraud shading. The default is Gouraud shading. To control the current shading mode, your application specifies a member of the D3DMSHADEMODE enumerated type for the D3DMRS_SHADEMODE render state (see D3DMRENDERSTATETYPE).

The following code example shows the process of setting the shading state to flat shading mode.

// This code example assumes that d3dmDevice is a
// valid pointer to a IDirect3DMobileDevice interface.
 
// Set the shading state.
d3dmDevice->SetRenderState(D3DMRS_SHADEMODE, D3DMSHADE_FLAT);

See Also

Concepts

Render States