From 8e5c4d5e23696ce46d4d4fd7ff28d987d7da20a4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 31 Jan 2011 17:04:41 +0100 Subject: Adapt CapabilitiesChooser.chooseCapabilities() changes of JOGL 8adc04788a6d9dd44de5a4636b46d14dbb70b799 --- src/demos/misc/GLCapsTableDemo.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/demos/misc') diff --git a/src/demos/misc/GLCapsTableDemo.java b/src/demos/misc/GLCapsTableDemo.java index abfef88..afa85fa 100755 --- a/src/demos/misc/GLCapsTableDemo.java +++ b/src/demos/misc/GLCapsTableDemo.java @@ -12,6 +12,7 @@ import java.awt.GraphicsEnvironment; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.List; import java.util.ArrayList; import javax.media.nativewindow.Capabilities; import javax.media.opengl.DefaultGLCapabilitiesChooser; @@ -71,14 +72,13 @@ public class GLCapsTableDemo new DefaultGLCapabilitiesChooser() { public int chooseCapabilities(CapabilitiesImmutable _desired, - CapabilitiesImmutable[] _available, + List/**/ available, int windowSystemRecommendedChoice) { GLCapabilitiesImmutable desired = (GLCapabilitiesImmutable) _desired; - GLCapabilitiesImmutable[] available = (GLCapabilitiesImmutable[]) _available; - if ( available != null ) - for (int i = 0; i < available.length; i++) { - GLCapabilitiesImmutable c = available[i]; + if ( available != null && available.size()>0 ) + for (int i = 0; i < available.size(); i++) { + GLCapabilitiesImmutable c = (GLCapabilitiesImmutable) available.get(i); if (c != null) { GLCapsTableDemo.this.available.add((GLCapabilities) c.cloneMutable()); GLCapsTableDemo.this.indices.add(new Integer(i)); @@ -133,7 +133,7 @@ public class GLCapsTableDemo * javax.media.nativewindow.Capabilities[], int) */ public int chooseCapabilities(CapabilitiesImmutable desired, - CapabilitiesImmutable[] available, + List/**/ available, int windowSystemRecommendedChoice) { int row = capsTable.getSelectedRow(); -- cgit v1.2.3