Shading State
A version of this page is also available for
4/8/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);