Share via


D3DHAL_DP2RENDERSTATE

One or more of these structures are parsed from the command buffer by the D3dDrawPrimitives2 callback when the D3DHAL_DP2COMMAND structure's bCommand member is set to D3DDP2OP_RENDERSTATE, and are used to set the appropriate render state.

typedef struct _D3DHAL_DP2RENDERSTATE {
  D3DRENDERSTATETYPE RenderState;
  union
  {
    D3DVALUE fState;
    DWORD dwState;
  };
} D3DHAL_DP2RENDERSTATE;

Members

  • RenderState
    Specifies a D3DRENDERSTATETYPE enumerated value that specifies the render state to be updated. The render states are described in the DirectX SDK documentation.
  • fState
    Specifies the value that the driver should update the render state identified by the RenderState member with. This member is valid when RenderState requires a D3DVALUE.
  • dwState
    Specifies the value that the driver should update the render state identified by RenderState to. This member is valid when RenderState requires a DWORD.

Remarks

D3dDrawPrimitives2 should process wStateCount D3DHAL_DP2RENDERSTATE structures from the command buffer. The value of wStateCount is specified in the D3DHAL_DP2COMMAND structure.

For each D3DHAL_DP2RENDERSTATE structure, D3dDrawPrimitives2 should update the driver's private render state and the render state array that the lpdwRStates member of D3DHAL_DRAWPRIMITIVES2DATA points to. The element to be updated in the public render state array is lpdwRStates[RenderState].

The following figure shows a portion of a sample command buffer containing a D3DDP2OP_RENDERSTATE command and two D3DHAL_DP2RENDERSTATE structures. The driver should update lpdwRStates[D3DRENDERSTATE_FILLMODE] to be D3DFILL_SOLID and lpdwRStates[D3DRENDERSTATE_SHADEMODE] to be D3DSHADE_GOURAUD. The driver should also update its private state accordingly.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3dhal.h.

See Also

D3dDrawPrimitives2 | D3DHAL_DP2COMMAND | D3DDP2OP_RENDERSTATE | D3DRENDERSTATETYPE | D3DHAL_DP2COMMAND | D3DHAL_XXX Structures

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.