About Render States

Device render states control the behavior of the Direct3D device's rasterization module. By altering the attributes of the rendering state, what type of shading is used, fog attributes, and many other rasterizer operations.

Applications control the other characteristics of the rendering state by invoking the IDirect3DDevice3::SetRenderState method. The D3DRENDERSTATETYPE enumerated type specifies all of the possible rendering states. Your application passes a value from the D3DRENDERSTATETYPE enumeration as the first parameter to the IDirect3DDevice3::SetRenderState method.

Render states also can control the style of texturing and how texture filtering is done. For DirectX 6.0 and later, all texture-related render states are superseded by corresponding features offered by the IDirect3DDevice3::SetTextureStageState method. The superseded render states still work, but are mapped to affect the corresponding state in the first texture stage (stage 0). For best performance, applications should use the features in the SetTextureStageState method if favor of the legacy render states. The following list shows the superseded render states and lists the corresponding states offered in the new texturing model:

D3DRENDERSTATE_TEXTUREADDRESS
Superseded by the D3DTSS_ADDRESS, D3DTSS_ADDRESSU, D3DTSS_ADDRESSV texture stage states for stage 0.
D3DRENDERSTATE_BORDERCOLOR
Superseded by the D3DTSS_BORDERCOLOR texture stage state for stage 0.
D3DRENDERSTATE_TEXTUREMAG
Superseded by the D3DTSS_MAGFILTER texture stage state for stage 0.
D3DRENDERSTATE_TEXTUREMIN
Superseded by the D3DTSS_MINFILTER texture stage state for stage 0. Mipmap minification filtering is superseded by D3DTSS_MIPFILTER.
D3DRENDERSTATE_TEXTUREMAPBLEND
Superseded by the D3DTSS_COLOROP and D3DTSS_ALPHAOP texture stage states for stage 0.