summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/Region.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java
index 6b590a4d8..b3cee629c 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/Region.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java
@@ -33,6 +33,7 @@ import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.concurrent.TimeUnit;
import jogamp.opengl.Debug;
@@ -44,6 +45,7 @@ import com.jogamp.common.nio.Buffers;
import com.jogamp.common.os.Clock;
import com.jogamp.common.util.PerfCounterCtrl;
import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.opengl.GLCapabilitiesImmutable;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.math.geom.AABBox;
import com.jogamp.opengl.math.geom.Frustum;
@@ -64,6 +66,14 @@ public abstract class Region {
/**
* Rendering-Mode bit for {@link #getRenderModes() Region}
* <p>
+ * One pass `norm` rendering either using no AA or underlying full-screen AA (fsaa).
+ * </p>
+ */
+ public static final int NORM_RENDERING_BIT = 0;
+
+ /**
+ * Rendering-Mode bit for {@link #getRenderModes() Region}
+ * <p>
* MSAA based Anti-Aliasing, a two pass region rendering, slower and more
* resource hungry (FBO), but providing fast MSAA in case
* the whole scene is not rendered with MSAA.
@@ -169,6 +179,13 @@ public abstract class Region {
return 0 != (renderModes & Region.COLORTEXTURE_RENDERING_BIT);
}
+ /**
+ * Returns a unique technical description string for renderModes as follows:
+ * <pre>
+ * (vbaa|msaa|norm)[-curve][-cols][-ctex]
+ * </pre>
+ * @param renderModes Graph renderModes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}
+ */
public static String getRenderModeString(final int renderModes) {
final String curveS = hasVariableWeight(renderModes) ? "-curve" : "";
final String cChanS = hasColorChannel(renderModes) ? "-cols" : "";
@@ -182,6 +199,20 @@ public abstract class Region {
}
}
+ /**
+ * Return a unique technical description string for renderModes and sample counts as follows:
+ * <pre>
+ * {@link #getRenderModeString(int)}-s{sampleCount}-fsaa{CapsNumSamples}
+ * </pre>
+ *
+ * @param renderModes the used Graph renderModes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}
+ * @param graphSampleCount Graph sample count for {@link Region#VBAA_RENDERING_BIT} or {@link Region#MSAA_RENDERING_BIT}
+ * @param fsaaSampleCount full-screen AA (fsaa) sample count, retrieved e.g. via {@link GLCapabilitiesImmutable#getNumSamples()}
+ */
+ public static String getRenderModeString(final int renderModes, final int graphSampleCount, final int fsaaSampleCount) {
+ return String.format((Locale)null, "%s-s%02d-fsaa%d", Region.getRenderModeString(renderModes), graphSampleCount, fsaaSampleCount);
+ }
+
protected Region(final int regionRenderModes, final boolean use_int32_idx) {
this.renderModes = regionRenderModes;
this.use_int32_idx = use_int32_idx;