summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
index 8603c7184..c5ded88f6 100644
--- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
@@ -89,11 +89,17 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
int windowSystemRecommendedChoice) {
GLCapabilities _desired = (GLCapabilities) desired;
GLCapabilities[] _available = (GLCapabilities[]) available;
+ int availnum = 0;
+
+ for (int i = 0; i < _available.length; i++) {
+ if(null != _available[i]) { availnum++; }
+ }
if (DEBUG) {
System.err.println("Desired: " + _desired);
+ System.err.println("Available: Valid " + availnum + "/" + _available.length);
for (int i = 0; i < _available.length; i++) {
- System.err.println("Available " + i + ": " + _available[i]);
+ System.err.println(i + ": " + _available[i]);
}
System.err.println("Window system's recommended choice: " + windowSystemRecommendedChoice);
}
@@ -132,6 +138,9 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
if (_desired.isOnscreen() != cur.isOnscreen()) {
continue;
}
+ if (_desired.isPBuffer() != cur.isPBuffer()) {
+ continue;
+ }
if (_desired.getStereo() != cur.getStereo()) {
continue;
}