Hardware Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize

D3DHAL_DP2PIXELSHADER structure

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, *LPD3DHAL_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

Header

D3dhal.h (include D3dhal.h)

See also

D3dDrawPrimitives2
D3DHAL_DP2SETPIXELSHADERCONST
D3DHAL_DP2CREATEPIXELSHADER

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft