From 1d265b51d2c52cac33419bf0e6ef35d92dee4550 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Mon, 11 Oct 2010 01:37:35 +0200
Subject: Harmonize all runtime properties, see
 doc/Implementation/runtime-properties.txt

---
 .../classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java    | 4 ++--
 src/jogl/classes/com/jogamp/opengl/impl/GLBufferSizeTracker.java      | 2 +-
 src/jogl/classes/com/jogamp/opengl/impl/GLBufferStateTracker.java     | 2 +-
 src/jogl/classes/com/jogamp/opengl/impl/GLContextShareSet.java        | 2 +-
 src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java    | 2 +-
 src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java         | 2 +-
 .../classes/com/jogamp/opengl/impl/gl2/fixme/GLObjectTracker.java     | 2 +-
 .../com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java  | 2 --
 .../com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java        | 3 ++-
 9 files changed, 10 insertions(+), 11 deletions(-)

(limited to 'src/jogl/classes/com/jogamp/opengl/impl')

diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
index 9d1235e13..75c4a6a73 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
@@ -51,8 +51,8 @@ import java.lang.reflect.*;
  * and display.
  */
 public final class ExtensionAvailabilityCache {
-  private static final boolean DEBUG = Debug.debug("ExtensionAvailabilityCache");
-  private static final boolean DEBUG_AVAILABILITY = Debug.isPropertyDefined("ExtensionAvailabilityCache", true);
+  private static final boolean DEBUG = GLContextImpl.DEBUG;
+  private static final boolean DEBUG_AVAILABILITY = Debug.isPropertyDefined("jogl.debug.ExtensionAvailabilityCache", true);
 
   ExtensionAvailabilityCache(GLContextImpl context)
   {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLBufferSizeTracker.java b/src/jogl/classes/com/jogamp/opengl/impl/GLBufferSizeTracker.java
index b4237501e..ceabd3910 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLBufferSizeTracker.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLBufferSizeTracker.java
@@ -95,7 +95,7 @@ public class GLBufferSizeTracker {
   // never shrinks is probably not that bad.
   private IntIntHashMap bufferSizeMap;
 
-  private static final boolean DEBUG = Debug.debug("GLBufferSizeTracker");
+  protected static final boolean DEBUG = Debug.debug("GLStatusTracker");
 
   public GLBufferSizeTracker() {
       bufferSizeMap = new IntIntHashMap();
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLBufferStateTracker.java b/src/jogl/classes/com/jogamp/opengl/impl/GLBufferStateTracker.java
index 05b2a2fa9..c3ed7b6b1 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLBufferStateTracker.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLBufferStateTracker.java
@@ -75,7 +75,7 @@ import com.jogamp.common.util.IntIntHashMap;
  */
 
 public class GLBufferStateTracker {
-  private static final boolean DEBUG = Debug.debug("GLBufferStateTracker");
+  protected static final boolean DEBUG = GLBufferSizeTracker.DEBUG;
 
   // Maps binding targets to buffer objects. A null value indicates
   // that the binding is unknown. A zero value indicates that it is
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextShareSet.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextShareSet.java
index abeb231f4..7be06b698 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextShareSet.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextShareSet.java
@@ -54,7 +54,7 @@ import javax.media.opengl.*;
 public class GLContextShareSet {
   // FIXME: refactor Java SE dependencies
   //  private static boolean forceTracking = Debug.isPropertyDefined("jogl.glcontext.forcetracking");
-  private static final boolean DEBUG = Debug.debug("GLContextShareSet");
+  private static final boolean DEBUG = Debug.debug("GLContext");
 
   // This class is implemented with a WeakHashMap that goes from the
   // contexts as keys to a complex data structure as value that tracks
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java
index 6cf326949..1cde00102 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java
@@ -51,7 +51,7 @@ import java.security.*;
     these GLDrawables is not supplied directly to end users, though
     they may be instantiated by the GLJPanel implementation. */
 public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
-  protected static final boolean DEBUG = Debug.debug("GLDrawableFactory");
+  protected static final boolean DEBUG = GLDrawableImpl.DEBUG;
 
   /** 
    * Returns the GLDynamicLookupHelper
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
index 1596f0baf..3cedb45c9 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
@@ -47,7 +47,7 @@ import javax.media.opengl.*;
     methods to be able to share it between GLCanvas and GLJPanel. */
 
 public class GLDrawableHelper {
-  private static final boolean DEBUG = Debug.debug("GLDrawableHelper");
+  protected static final boolean DEBUG = GLDrawableImpl.DEBUG;
   private static final boolean VERBOSE = Debug.verbose();
   private Object listenersLock = new Object();
   private List listeners = new ArrayList();
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/gl2/fixme/GLObjectTracker.java b/src/jogl/classes/com/jogamp/opengl/impl/gl2/fixme/GLObjectTracker.java
index 3e3b6ae87..6ee29b876 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/gl2/fixme/GLObjectTracker.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/gl2/fixme/GLObjectTracker.java
@@ -69,7 +69,7 @@ import javax.media.opengl.*;
  */
 
 public class GLObjectTracker {
-  private static final boolean DEBUG = Debug.debug("GLObjectTracker");
+  private static final boolean DEBUG = Debug.debug("GLStatusTracker");
 
   //----------------------------------------------------------------------
   // Adders
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
index 66953289b..abbaf5004 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java
@@ -43,8 +43,6 @@ import javax.media.opengl.*;
 import com.jogamp.opengl.impl.*;
 
 public class WindowsPbufferWGLContext extends WindowsWGLContext {
-  private static final boolean DEBUG = Debug.debug("WindowsPbufferWGLContext");
-
   // State for render-to-texture and render-to-texture-rectangle support
   private boolean rtt;       // render-to-texture?
   private boolean hasRTT;    // render-to-texture extension available?
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java
index 9fef457db..984708f52 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java
@@ -43,10 +43,11 @@ package com.jogamp.opengl.impl.windows.wgl;
 import javax.media.nativewindow.*;
 import javax.media.opengl.*;
 import com.jogamp.opengl.impl.*;
+import java.security.*;
 
 public abstract class WindowsWGLDrawable extends GLDrawableImpl {
   private static final int MAX_SET_PIXEL_FORMAT_FAIL_COUNT = 5;
-  private static final boolean PROFILING = Debug.debug("WindowsWGLDrawable.profiling");
+  private static final boolean PROFILING = Debug.isPropertyDefined("jogl.debug.GLDrawable.profiling", true, AccessController.getContext());
   private static final int PROFILING_TICKS = 200;
   private int  profilingLockSurfaceTicks;
   private long profilingLockSurfaceTime;
-- 
cgit v1.2.3