D3DCLIPSTATUS9 structure

Describes the current clip status.

Syntax

typedef struct D3DCLIPSTATUS9 {
  DWORD ClipUnion;
  DWORD ClipIntersection;
} D3DCLIPSTATUS9, *LPD3DCLIPSTATUS9;

Members

ClipUnion

Type: DWORD

Clip union flags that describe the current clip status. This member can be one or more of the following flags:

Value Meaning
D3DCS_ALL
Combination of all clip flags.
D3DCS_LEFT
All vertices are clipped by the left plane of the viewing frustum.
D3DCS_RIGHT
All vertices are clipped by the right plane of the viewing frustum.
D3DCS_TOP
All vertices are clipped by the top plane of the viewing frustum.
D3DCS_BOTTOM
All vertices are clipped by the bottom plane of the viewing frustum.
D3DCS_FRONT
All vertices are clipped by the front plane of the viewing frustum.
D3DCS_BACK
All vertices are clipped by the back plane of the viewing frustum.
D3DCS_PLANE0
Application-defined clipping planes.
D3DCS_PLANE1
Application-defined clipping planes.
D3DCS_PLANE2
Application-defined clipping planes.
D3DCS_PLANE3
Application-defined clipping planes.
D3DCS_PLANE4
Application-defined clipping planes.
D3DCS_PLANE5
Application-defined clipping planes.

 

ClipIntersection

Type: DWORD

Clip intersection flags that describe the current clip status. This member can take the same flags as ClipUnion.

Remarks

When clipping is enabled during vertex processing (by ProcessVertices, DrawPrimitive, or other drawing functions), Direct3D computes a clip code for every vertex. The clip code is a combination of D3DCS_* bits. When a vertex is outside a particular clipping plane, the corresponding bit is set in the clipping code. Direct3D maintains the clip status using D3DCLIPSTATUS9, which has ClipUnion and ClipIntersection members. ClipUnion is a bitwise OR of all vertex clip codes and ClipIntersection is a bitwise AND of all vertex clip codes. Initial values are zero for ClipUnion and 0xFFFFFFFF for ClipIntersection. When D3DRS_CLIPPING is set to FALSE, ClipUnion and ClipIntersection are set to zero. Direct3D updates the clip status during drawing calls. To compute clip status for a particular object, set ClipUnion and ClipIntersection to their initial value and continue drawing.

Clip status is not updated by DrawRectPatch and DrawTriPatch because there is no software emulation for them.

Requirements

Requirement Value
Header
D3D9Types.h

See also

Direct3D Structures

GetClipStatus

SetClipStatus