diff options
author | Kenneth Russel <[email protected]> | 2005-02-26 01:41:28 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-02-26 01:41:28 +0000 |
commit | b41b720c4366d4e2cdc1ba146123b87da966d724 (patch) | |
tree | 6c6c8196e9ac0ef57f068f394c1720ec034639c2 /src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java | |
parent | 2bb02ad536c5404f008ff71c6d4ca013abaff683 (diff) |
Merged with current JOGL trunk (tag JOGL_1_1_PRE_B10)
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@245 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java')
-rw-r--r-- | src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java b/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java index 8d5ecabc9..9cac4f83a 100644 --- a/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java +++ b/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java @@ -39,6 +39,8 @@ package net.java.games.jogl; +import net.java.games.jogl.impl.Debug; + /** <P> The default implementation of the {@link GLCapabilitiesChooser} interface, which provides consistent visual selection behavior across platforms. The precise algorithm is @@ -78,11 +80,17 @@ package net.java.games.jogl; */ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser { - private static final boolean DEBUG = false; + private static final boolean DEBUG = Debug.debug("DefaultGLCapabilitiesChooser"); public int chooseCapabilities(GLCapabilities desired, GLCapabilities[] available, int windowSystemRecommendedChoice) { + if (DEBUG) { + for (int i = 0; i < available.length; i++) { + System.err.println("Available " + i + ": " + available[i]); + } + } + if (windowSystemRecommendedChoice >= 0 && windowSystemRecommendedChoice < available.length && available[windowSystemRecommendedChoice] != null) { @@ -93,12 +101,6 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser { return windowSystemRecommendedChoice; } - if (DEBUG) { - for (int i = 0; i < available.length; i++) { - System.err.println("Available " + i + ": " + available[i]); - } - } - // Create score array int[] scores = new int[available.length]; int NO_SCORE = -9999999; |