D3DHAL_DP2PIXELSHADER structure (d3dhal.h)
DirectX 8.0 and later versions only.
The D3DHAL_DP2PIXELSHADER 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.
Syntax
typedef struct _D3DHAL_DP2PIXELSHADER {
DWORD dwHandle;
} D3DHAL_DP2PIXELSHADER;
Members
dwHandle
Specifies the handle to the pixel shader that is assigned by the runtime. For delete requests, the handle is guaranteed to be subzero. For set requests, the handle can be zero. If set to zero, the driver should reset 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
Requirement | Value |
---|---|
Header | d3dhal.h (include D3dhal.h) |