aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-16 15:40:48 +0200
committerSven Gothel <[email protected]>2023-09-16 15:40:48 +0200
commitaac1265340ae2ee1cad6bbf89369ba0288a6a290 (patch)
treea2f7e0e80b6de5d491a63a97d2e9ef72b0c51568 /src/jogl
parente5de90b67efe8e8ca518159b3a73295d751764c1 (diff)
Debug.debugExplicit(): Define and use explicit symbol debug flag; Use it for certain debug output to keep most silence for debugAll()
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/Region.java6
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java3
-rw-r--r--src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java2
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java8
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/Debug.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java2
8 files changed, 25 insertions, 12 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java
index 07592430e..66ef3da6e 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/Region.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java
@@ -61,9 +61,11 @@ import com.jogamp.opengl.util.texture.TextureSequence;
*/
public abstract class Region {
+ public static final boolean DEBUG_ALL_EVENT = Debug.debugExplicit("graph.curve.AllEvent");
+ public static final boolean DEBUG_INSTANCE = Debug.debugExplicit("graph.curve.Instance");
+
/** Debug flag for [com.]jogamp.graph.curve.* incl. Region (graph.curve) */
- public static final boolean DEBUG = Debug.debug("graph.curve");
- public static final boolean DEBUG_INSTANCE = Debug.debug("graph.curve.Instance");
+ public static final boolean DEBUG = DEBUG_ALL_EVENT || Debug.debug("graph.curve");
/**
* Rendering-Mode bit for {@link #getRenderModes() Region}
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
index 0c939d015..6fbedf809 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -65,6 +65,7 @@ import com.jogamp.graph.curve.Region;
*/
public final class RegionRenderer {
protected static final boolean DEBUG = Region.DEBUG;
+ protected static final boolean DEBUG_ALL_EVENT = Region.DEBUG_ALL_EVENT;
protected static final boolean DEBUG_INSTANCE = Region.DEBUG_INSTANCE;
/**
@@ -560,7 +561,7 @@ public final class RegionRenderer {
if( DEBUG ) {
if( spChanged ) {
System.err.printf("RegionRendererImpl01.useShaderProgram.X1: GOT renderModes %s, sel1 %s, key 0x%X -> sp %d / %d (changed)%n", Region.getRenderModeString(renderModes), sel1, shaderKey, sp.program(), sp.id());
- } else {
+ } else if( DEBUG_ALL_EVENT ) {
System.err.printf("RegionRendererImpl01.useShaderProgram.X1: GOT renderModes %s, sel1 %s, key 0x%X -> sp %d / %d (keep)%n", Region.getRenderModeString(renderModes), sel1, shaderKey, sp.program(), sp.id());
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
index c25abe188..25b5a8ad7 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
@@ -81,7 +81,7 @@ import com.jogamp.common.os.Platform;
* </p>
*/
public final class FloatUtil {
- public static final boolean DEBUG = Debug.debug("Math");
+ public static final boolean DEBUG = Debug.debugExplicit("Math");
//
// Matrix Ops
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
index e5221eefb..52c674342 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
@@ -208,7 +208,9 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
updateLocLocal = !sp.equals(spPass1);
spPass1 = sp;
if( DEBUG ) {
- System.err.println("XXX changedSP.p1 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ if( DEBUG_ALL_EVENT || updateLocLocal || updateLocGlobal ) {
+ System.err.println("XXX changedSP.p1 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ }
}
if( updateLocLocal ) {
rs.updateAttributeLoc(gl, true, gca_VerticesAttr, true);
@@ -229,7 +231,9 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
updateLocLocal = !sp.equals(spPass2);
spPass2 = sp;
if( DEBUG ) {
- System.err.println("XXX changedSP.p2 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ if( DEBUG_ALL_EVENT || updateLocLocal || updateLocGlobal ) {
+ System.err.println("XXX changedSP.p2 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ }
}
if( updateLocLocal ) {
rs.updateAttributeLoc(gl, true, gca_FboVerticesAttr, true);
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
index f7ab0a2d6..d8e8166b3 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
@@ -144,7 +144,9 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
updateLocLocal = !sp.equals(spPass1);
spPass1 = sp;
if( DEBUG ) {
- System.err.println("XXX changedSP.p1 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ if( DEBUG_ALL_EVENT || updateLocLocal || updateLocGlobal ) {
+ System.err.println("XXX changedSP.p1 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ }
}
if( updateLocLocal ) {
rs.updateAttributeLoc(gl, true, gca_VerticesAttr, true);
@@ -165,7 +167,9 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
updateLocLocal = !sp.equals(spPass2);
spPass2 = sp;
if( DEBUG ) {
- System.err.println("XXX changedSP.p2 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ if( DEBUG_ALL_EVENT || updateLocLocal || updateLocGlobal ) {
+ System.err.println("XXX changedSP.p2 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ }
}
if( updateLocLocal ) {
rs.updateAttributeLoc(gl, true, gca_FboVerticesAttr, true);
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
index 9d9e2bbea..a819f9267 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
@@ -138,7 +138,9 @@ public final class VBORegionSPES2 extends GLRegion {
final boolean updateLocLocal = !sp.equals(spPass1);
spPass1 = sp;
if( DEBUG ) {
- System.err.println("XXX changedSP.p1 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ if( DEBUG_ALL_EVENT || updateLocLocal || updateLocGlobal ) {
+ System.err.println("XXX changedSP.p1 updateLocation loc "+updateLocLocal+" / glob "+updateLocGlobal);
+ }
}
if( updateLocLocal ) {
rs.updateAttributeLoc(gl, true, gca_VerticesAttr, throwOnError);
diff --git a/src/jogl/classes/jogamp/opengl/Debug.java b/src/jogl/classes/jogamp/opengl/Debug.java
index 6cdc1c358..274275a2d 100644
--- a/src/jogl/classes/jogamp/opengl/Debug.java
+++ b/src/jogl/classes/jogamp/opengl/Debug.java
@@ -69,11 +69,11 @@ public class Debug extends PropertyAccess {
return debugAll;
}
- public static final boolean debugNotAll(final String subcomponent) {
+ public static final boolean debugExplicit(final String subcomponent) {
return isPropertyDefined("jogl.debug." + subcomponent, true);
}
public static final boolean debug(final String subcomponent) {
- return debugAll() || debugNotAll(subcomponent);
+ return debugAll() || debugExplicit(subcomponent);
}
}
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 20a433aa9..2fb690747 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -125,7 +125,7 @@ public class MacOSXCGLContext extends GLContextImpl
isMavericksOrLater = false;
isMojaveOrLater = false;
}
- DEBUG1398 = Debug.debugNotAll("Bug1398");
+ DEBUG1398 = Debug.debugExplicit("Bug1398");
}
static boolean isGLProfileSupported(final int ctp, final int major, final int minor) {