aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-07-03 23:31:02 +0000
committerSven Gothel <[email protected]>2009-07-03 23:31:02 +0000
commit944a0ca587d20d193b9f8c7b5edbd0b0bd0d7666 (patch)
tree61473a7a57d71427ce8fdf927eefc74130e093bb /src/jogl/classes/javax/media/opengl
parent02ccc7939e2c542860f154e4f9063dbb1839a893 (diff)
Fix property query. Thx to Ken pointing this out.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2018 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLAutoDrawable.java3
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java7
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java2
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java8
4 files changed, 8 insertions, 12 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
index f0450e89e..43347c416 100644
--- a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
@@ -41,6 +41,7 @@ package javax.media.opengl;
import javax.media.opengl.glu.*;
import com.sun.opengl.impl.Debug;
+import java.security.*;
/** A higher-level abstraction than {@link GLDrawable} which supplies
an event based mechanism ({@link GLEventListener}) for performing
@@ -112,7 +113,7 @@ public interface GLAutoDrawable extends GLDrawable {
/** Flag reflecting wheather the drawable reconfiguration will be issued in
* case a screen device change occured, e.g. in a multihead environment,
* where you drag the window to another monitor. */
- public static final boolean SCREEN_CHANGE_ACTION_ENABLED = Debug.getBooleanProperty("jogl.screenchange.action", true);
+ public static final boolean SCREEN_CHANGE_ACTION_ENABLED = Debug.getBooleanProperty("jogl.screenchange.action", true, AccessController.getContext());
/** FIXME:
** Invalid state, the resources are not yet ready to render. *
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index ef7fa8189..a2bff729a 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -56,8 +56,6 @@ import java.util.HashMap;
refer to a given context. */
public abstract class GLContext {
- protected static final boolean DEBUG = Debug.isPropertyDefined("jogl.debug.GLContext"); // Debug.debug("GLContext");
-
/** Indicates that the context was not made current during the last call to {@link #makeCurrent makeCurrent}. */
public static final int CONTEXT_NOT_CURRENT = 0;
/** Indicates that the context was made current during the last call to {@link #makeCurrent makeCurrent}. */
@@ -180,11 +178,6 @@ public abstract class GLContext {
* new GLContext implementations; not for use by end users.
*/
protected static void setCurrent(GLContext cur) {
- if(DEBUG) {
- Exception e = new Exception("setCurrent: "+Thread.currentThread()+", "+currentContext.get()+" -> "+cur);
- e.printStackTrace();
- }
-
currentContext.set(cur);
}
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 3724556db..d95d6d492 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -109,7 +109,7 @@ public abstract class GLDrawableFactory {
String factoryClassName = null;
tmp = null;
try {
- factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true);
+ factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true, AccessController.getContext());
if (null == factoryClassName) {
if ( nativeOSType.equals(NativeWindowFactory.TYPE_EGL) ) {
// use egl*Factory ..
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 5da6a892f..74da59cd3 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -110,20 +110,22 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
// Used by all backends either directly or indirectly to hook up callbacks
private Updater updater = new Updater();
+ private static final AccessControlContext localACC = AccessController.getContext();
+
// Turns off the pbuffer-based backend (used by default, unless the
// Java 2D / OpenGL pipeline is in use)
private static boolean hardwareAccelerationDisabled =
- Debug.isPropertyDefined("jogl.gljpanel.nohw");
+ Debug.isPropertyDefined("jogl.gljpanel.nohw", true, localACC);
// Turns off the fallback to software-based rendering from
// pbuffer-based rendering
private static boolean softwareRenderingDisabled =
- Debug.isPropertyDefined("jogl.gljpanel.nosw");
+ Debug.isPropertyDefined("jogl.gljpanel.nosw", true, localACC);
// Indicates whether the Java 2D OpenGL pipeline is enabled
private boolean oglPipelineEnabled =
Java2D.isOGLPipelineActive() &&
- !Debug.isPropertyDefined("jogl.gljpanel.noogl");
+ !Debug.isPropertyDefined("jogl.gljpanel.noogl", true, localACC);
// For handling reshape events lazily
private int reshapeX;