diff options
Diffstat (limited to 'src')
-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; |