Package icyllis.arc3d.granite
Class ClipStack
java.lang.Object
icyllis.arc3d.granite.ClipStack
GPU hierarchical clipping.
We use scissor test and depth test to apply clip, antialiasing only works on multisampled targets.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
Clip ops.static final int
Clip ops.static final int
Clip states.static final int
Clip states.static final int
Clip states.static final int
Clip states. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
@UnmodifiableView Collection
<ClipStack.Element> elements()
static int
void
static boolean
int
<GEO> boolean
prepareForDraw
(Draw draw, GEO geometry, BiConsumer<GEO, Rect2f> boundsFn, boolean outsetBoundsForAA, List<ClipStack.Element> elementsForMask) void
void
restore()
void
save()
int
updateForDraw
(Draw draw, List<ClipStack.Element> elementsForMask, BoundsManager boundsManager, int depth)
-
Field Details
-
OP_DIFFERENCE
public static final int OP_DIFFERENCEClip ops.- See Also:
-
OP_INTERSECT
public static final int OP_INTERSECTClip ops.- See Also:
-
STATE_EMPTY
public static final int STATE_EMPTYClip states.- See Also:
-
STATE_WIDE_OPEN
public static final int STATE_WIDE_OPENClip states.- See Also:
-
STATE_DEVICE_RECT
public static final int STATE_DEVICE_RECTClip states.- See Also:
-
STATE_COMPLEX
public static final int STATE_COMPLEXClip states.- See Also:
-
CLIP_GEOMETRY_EMPTY
public static final int CLIP_GEOMETRY_EMPTY- See Also:
-
CLIP_GEOMETRY_A_ONLY
public static final int CLIP_GEOMETRY_A_ONLY- See Also:
-
CLIP_GEOMETRY_B_ONLY
public static final int CLIP_GEOMETRY_B_ONLY- See Also:
-
CLIP_GEOMETRY_BOTH
public static final int CLIP_GEOMETRY_BOTH- See Also:
-
-
Constructor Details
-
ClipStack
-
-
Method Details
-
currentClipState
public int currentClipState() -
save
public void save() -
restore
public void restore() -
elements
-
clipRect
-
maxDeferredClipDraws
public int maxDeferredClipDraws() -
getConservativeBounds
-
prepareForDraw
public <GEO> boolean prepareForDraw(Draw draw, GEO geometry, BiConsumer<GEO, Rect2f> boundsFn, boolean outsetBoundsForAA, List<ClipStack.Element> elementsForMask) -
updateForDraw
public int updateForDraw(Draw draw, List<ClipStack.Element> elementsForMask, BoundsManager boundsManager, int depth) -
recordDeferredClipDraws
public void recordDeferredClipDraws() -
intersects
-
getClipGeometry
-