aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-03 02:30:07 +0200
committerSven Gothel <[email protected]>2023-09-03 02:30:07 +0200
commitc059585e246ed707ba490f9d2bae3a8b90e949a7 (patch)
tree61349e65c273e16a0f0a0a31998f28a968c81d36 /src/jogl/classes/com/jogamp/graph
parentef63d2e288fe47762d9cf743d11cd01f8d255349 (diff)
GraphUI Scene: Pass sampleCount in ctor variant and refine API doc, clip to [1..8]; Add clarity in Region; Demos CommandlineOptions adds actual graphAASamples set and utilized
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/Region.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java
index 345b45eab..07592430e 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/Region.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java
@@ -93,6 +93,9 @@ public abstract class Region {
*/
public static final int VBAA_RENDERING_BIT = 1 << 1;
+ /** Rendering bit-mask including {@link #MSAA_RENDERING_BIT} and {@link #VBAA_RENDERING_BIT}. */
+ public static final int AA_RENDERING_MASK = MSAA_RENDERING_BIT | VBAA_RENDERING_BIT;
+
/**
* Rendering-Mode bit for {@link #getRenderModes() Region}
* <p>
@@ -142,16 +145,24 @@ public abstract class Region {
protected final AABBox box = new AABBox();
protected Frustum frustum = null;
+ /** Returns true if given {@code renderModes} has {@link Region#VBAA_RENDERING_BIT} set. */
public static boolean isVBAA(final int renderModes) {
return 0 != (renderModes & Region.VBAA_RENDERING_BIT);
}
+ /** Returns true if given {@code renderModes} has {@link Region#MSAA_RENDERING_BIT} set. */
public static boolean isMSAA(final int renderModes) {
return 0 != (renderModes & Region.MSAA_RENDERING_BIT);
}
+ /** Returns true if given {@code renderModes} has any of {@link Region#AA_RENDERING_MASK} set. */
+ public static boolean isGraphAA(final int renderModes) {
+ return 0 != ( renderModes & Region.AA_RENDERING_MASK );
+ }
+
+ /** Returns true if given {@code renderModes} has any of {@link Region#AA_RENDERING_MASK} set. */
public static boolean isTwoPass(final int renderModes) {
- return 0 != ( renderModes & ( Region.VBAA_RENDERING_BIT | Region.MSAA_RENDERING_BIT) );
+ return 0 != ( renderModes & Region.AA_RENDERING_MASK );
}
/**