Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.SetClipStatus

Sets the clip status.

object.SetClipStatus( _ 
    ClipStatus As D3DCLIPSTATUS8)

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
ClipStatus
A D3DCLIPSTATUS8 type, describing the clip status settings to be set.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL if the ClipStatus parameter is invalid.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

When clipping is enabled during vertex processing (by ProcessVertices, DrawPrimitive, or other drawing functions), Microsoft® 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 D3DClipStatus8, 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.

See Also

Direct3DDevice8.GetClipStatus