Share via


D3DRENDERSTATETYPE

This enumerated type lists a variety of attributes, or render states, that the driver uses when it performs graphics rendering. These attributes include such characteristics as whether alpha blending is enabled, whether dithering is enabled, whether Direct3D lighting is used, and the type of shading to be used.

Only render states that are specific to device drivers are included here. For more information on the render states accessible to DirectX applications, see Render States in the Direct3D SDK documentation.

Enumerator Description
D3DRENDERSTATE_SCENECAPTURE Specifies either begin scene information or end scene information for geometric data captured within a frame.
D3DRS_DELETERTPATCH Deletes a patch (rectangular or triangular).
D3DRENDERSTATE_EVICTMANAGEDTEXTURES Determines whether textures are evicted from memory.

Remarks

To update a particular render state, Direct3D stores information about the render state, and then calls the driver's D3dDrawPrimitives2 callback routine. The information provided to the driver enables it to perform the following tasks:

  • Determine that it should update one or more render states.

  • Identify which render states to update, and what the new render state values should be.

    Note   For certain render states to be honored, the driver must have previously set capability flags in the relevant member of the D3DPRIMCAPS structure.

In order to indicate a specific render state update, Direct3D inserts a D3DHAL_DP2COMMAND structure into the command buffer, setting the bCommand member of this structure to D3DDP2OP_RENDERSTATE, and setting the wStateCount member of the same structure to the number of render states to be updated.

Immediately following the D3DHAL_DP2COMMAND structure, Direct3D inserts one D3DHAL_DP2RENDERSTATE structure into the command buffer for each render state to be updated. The RenderState member of this structure identifies the render state to be changed; the new value of this render state is specified in either the dwState member (for DWORD values) or the fState member (for D3DVALUE values).

The following figure shows a portion of the command buffer containing a D3DDP2OP_RENDERSTATE command and two D3DHAL_DP2RENDERSTATE structures. The first of the three structures indicates that two render states are to be updated. The second structure indicates that the D3DRENDERSTATE_FILLMODE render state is to be changed to D3DFILL_SOLID. The third structure indicates that the D3DRENDERSTATE_SHADEMODE render state should be updated to D3DSHADE_GOURAUD.

See the D3DTEXTURESTAGESTATETYPE, D3DTEXTUREOP, and D3DTEXTUREFILTERTYPE enumerated types in the DirectX SDK documentation for complete listings of all of the enabled render state types.

Multitexture macro ops and D3DRENDERSTATE_TEXTUREFACTOR override all of the per-texture stage blending controls (COLOR{OP,ARG1,ARG2} & ALPHA{OP,ARG1,ARG2}).

See Also

Render States | D3DRENDERSTATE_SCENECAPTURE | D3DRS_DELETERTPATCH | D3DRENDERSTATE_EVICTMANAGEDTEXTURES | D3dDrawPrimitives2 | D3DPRIMCAPS | D3DHAL_DP2COMMAND | D3DDP2OP_RENDERSTATE | D3DHAL_DP2RENDERSTATE | D3DTEXTURESTAGESTATETYPE | D3DTEXTUREOP | D3DTEXTUREFILTERTYPE | Direct3D Driver Enumerations

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.