summaryrefslogtreecommitdiffstats
path: root/src/demos/misc/GLCapsTableDemo.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-01-31 17:04:41 +0100
committerSven Gothel <[email protected]>2011-01-31 17:04:41 +0100
commit8e5c4d5e23696ce46d4d4fd7ff28d987d7da20a4 (patch)
treefd8cad41d9a1362e995a887e36f94df6c44492eb /src/demos/misc/GLCapsTableDemo.java
parente35038cc3c01b6ad8beb559986102c68fde614b6 (diff)
Adapt CapabilitiesChooser.chooseCapabilities() changes of JOGL 8adc04788a6d9dd44de5a4636b46d14dbb70b799
Diffstat (limited to 'src/demos/misc/GLCapsTableDemo.java')
-rwxr-xr-xsrc/demos/misc/GLCapsTableDemo.java12
1 files changed, 6 insertions, 6 deletions
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/*<CapabilitiesImmutable>*/ 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/*<CapabilitiesImmutable>*/ available,
int windowSystemRecommendedChoice)
{
int row = capsTable.getSelectedRow();