Share via


D3DHAL_DP2PIXELSHADER

This structure is used to set the current pixel shader, or delete a pixel shader, depending on the opcode received (D3DDP2OP_SETPIXELSHADER or D3DDP2OP_DELETEPIXELSHADER) by D3dDrawPrimitives2.

typedef struct _D3DHAL_DP2PIXELSHADER {
  DWORD dwHandle;
} D3DHAL_DP2PIXELSHADER, *LPD3DHAL_DP2PIXELSHADER;

Members

  • dwHandle
    Specifies the handle assigned by the run time to the pixel shader to set or delete. For delete, the handle is guaranteed to be non-zero. For set, It is legal for this handle to be zero in which case the driver should unset any programmable pixel state and revert to fixed function pixel processing behavior (for example by using render states).

Remarks

When switching from fixed function pixel processing to programmable vertex processing the values of, for example, legacy render states and texture stage states should be preserved. If and when a switch from programmable to fixed function pixel processing occurs (the driver receives a D3DDP2OP_SETPIXELSHADER with a shader handle of zero) that preserved state should be restored.

When switching between programmable shaders, any constant register that has a value specified in the definition of that shader should be set to that value. The values of all other constant registers should remain unchanged.

Requirements

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

See Also

D3dDrawPrimitives2 | D3DDP2OP_SETPIXELSHADER | D3DDP2OP_DELETEPIXELSHADER | D3dDrawPrimitives2 | D3DHAL_XXX Structures

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.