DirectX SDK

D3DCLIPPLANEn

The D3DCLIPPLANEn macros define bit patterns that enable user-defined clipping planes. These macros are defined as a convenience when setting values for the D3DRENDERSTATE_CLIPPLANEENABLE render state.

#define D3DCLIPPLANE0 (1 << 0) 
#define D3DCLIPPLANE1 (1 << 1) 
#define D3DCLIPPLANE2 (1 << 2) 
#define D3DCLIPPLANE3 (1 << 3) 
#define D3DCLIPPLANE4 (1 << 4) 
#define D3DCLIPPLANE5 (1 << 5) 
#define D3DCLIPPLANE6 (1 << 6) 
#define D3DCLIPPLANE7 (1 << 7) 

Parameters

None.

Remarks

User-defined clipping planes are enabled when the DWORD value set in the D3DRENDERSTATE_CLIPPLANEENABLE render state contains one or more set bits (that is, is not 0). The value of the render-state DWORD is not important; the system does not interpret the value as a number. Rather, it parses the DWORD, enabling any clipping planes whose corresponding bit is set. Bit 0 controls the state of the first clipping plane (at index 0), bit 1 the second plane, and so on.

The bit patterns that these macros create can be combined by using a logical OR operation to simultaneously enable multiple clipping planes. Omitting one of these macros from the combination effectively disables the clipping plane at that index.

See Also

D3DRENDERSTATE_CLIPPLANEENABLE