About Render States (Windows Embedded CE 6.0)
1/6/2010
Device render states control the behavior of the Microsoft® Direct3D® Mobile device's rasterization module. They do this by altering the attributes of the rendering state, what type of shading is used, fog attributes, and other rasterizer operations.
Applications control the characteristics of the rendering state by invoking the IDirect3DMobileDevice::SetRenderState method. The D3DMRENDERSTATETYPE enumerated type specifies all possible rendering states. Your application passes a value from the D3DMRENDERSTATETYPE enumeration as the first parameter to the SetRenderState method.
Fixed function vertex processing is controlled by the SetRenderState method and the following device render states (see D3DMRENDERSTATETYPE):
- D3DMRS_SPECULARENABLE
- D3DMRS_FOGSTART
- D3DMRS_FOGEND
- D3DMRS_FOGDENSITY
- D3DMRS_RANGEFOGENABLE
- D3DMRS_LIGHTING
- D3DMRS_AMBIENT
- D3DMRS_FOGVERTEXMODE
- D3DMRS_COLORVERTEX
- D3DMRS_LOCALVIEWER
- D3DMRS_NORMALIZENORMALS
- D3DMRS_DIFFUSEMATERIALSOURCE
- D3DMRS_SPECULARMATERIALSOURCE
- D3DMRS_AMBIENTMATERIALSOURCE
In addition, the fixed-function vertex processing pipeline uses the following methods to set transforms, materials, and lights:
IDirect3DMobileDevice::LightEnable
Note
D3DMRS_SPECULARENABLE controls the addition of specular color in the pixel pipeline. D3DMRS_FOGSTART, D3DMRS_FOGEND, and D3DMRS_FOGDENSITY control the start, end, and density of pixel fog density computation.