diff options
author | Sven Gothel <[email protected]> | 2011-08-07 07:51:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-07 07:51:57 +0200 |
commit | e38739fa5badeb4ff9933805ae5012a0b98bbcbb (patch) | |
tree | 093cd1718093decdcd4cf304a603857d0fc49c00 | |
parent | 8f604ad1aa27455b2fdadf100c6df3e02727473d (diff) |
Don't enable DebugGL/TraceGL with jogl.debug=all
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLContext.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 766533aab..0bf4abab6 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -41,6 +41,8 @@ package javax.media.opengl; import java.nio.IntBuffer; +import java.security.AccessControlContext; +import java.security.AccessController; import java.util.HashMap; import java.util.HashSet; import javax.media.nativewindow.AbstractGraphicsDevice; @@ -63,10 +65,17 @@ import jogamp.opengl.GLContextImpl; abstraction provides a stable object which clients can use to refer to a given context. */ public abstract class GLContext { + /** Reflects property jogl.debug.DebugGL. If true, the debug pipeline is enabled at context creation. */ - public final static boolean DEBUG_GL = Debug.debug("DebugGL"); + public final static boolean DEBUG_GL; /** Reflects property jogl.debug.TraceGL. If true, the trace pipeline is enabled at context creation. */ - public final static boolean TRACE_GL = Debug.debug("TraceGL"); + public final static boolean TRACE_GL; + + static { + final AccessControlContext acl = AccessController.getContext(); + DEBUG_GL = Debug.isPropertyDefined("jogl.debug.DebugGL", true, acl); + TRACE_GL = Debug.isPropertyDefined("jogl.debug.TraceGL", true, acl); + } /** Indicates that the context was not made current during the last call to {@link #makeCurrent makeCurrent}. */ public static final int CONTEXT_NOT_CURRENT = 0; |