Microsoft DirectX 9.0

Render States

Device render states control the behavior of the Microsoft?Direct3D?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 written in C++ control the characteristics of the rendering state by invoking the IDirect3DDevice9::SetRenderState method. The D3DRENDERSTATETYPE enumerated type specifies all possible rendering states. Your application passes a value from the D3DRENDERSTATETYPE enumeration as the first parameter to the IDirect3DDevice9::SetRenderState method.

Fixed function vertex processing is controlled by the IDirect3DDevice9::SetRenderState method and the following device render states. Most of these controls do not have any effect when using programmed vertex shaders.

In addition, the fixed-function vertex processing pipeline uses the following methods to set transforms, materials, and lights.

Note  D3DRS_SPECULARENABLE controls the addition of specular color in the pixel pipeline. D3DRS_FOGSTART, D3DRS_FOGEND, and D3DRS_FOGDENSITY control the start, end, and density of pixel fog density computation.

Additional information is contained in the following topics.


© 2002 Microsoft Corporation. All rights reserved.