Culling State
A version of this page is also available for
4/8/2010
As Microsoft® Direct3D® Mobile renders primitives, it culls primitives that are facing away from the user.
Applications set the culling mode by using the D3DRS_CULLMODE render state (see D3DMRENDERSTATETYPE), which can be set to a member of the D3DMCULL enumerated type. By default, Direct3D Mobile culls back faces with counterclockwise vertices.
The following code sample shows the process of setting the culling mode to cull back faces with clockwise vertices.
// This code example assumes that d3dmDevice is a valid
// pointer to an IDirect3DMobileDevice interface.
// Set the culling state.
d3dmDevice->SetRenderState(D3DMRS_CULLMODE, D3DMCULL_CW);