From b41b720c4366d4e2cdc1ba146123b87da966d724 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sat, 26 Feb 2005 01:41:28 +0000 Subject: 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 --- .../java/games/jogl/DefaultGLCapabilitiesChooser.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java') 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; + /**

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; -- cgit v1.2.3