aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java')
-rw-r--r--src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java16
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;