From 1c05c85e1ccc480da227cd6aa4718efd386e1e35 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 21 Jun 2012 20:14:46 +0200 Subject: JOGL CapabilitiesChooser-API and impl.: Cleanup using generics: 'List l' -> 'List l' --- .../media/opengl/DefaultGLCapabilitiesChooser.java | 9 ++++---- .../javax/media/opengl/GLCapabilitiesChooser.java | 12 ++++++++--- .../opengl/GLGraphicsConfigurationFactory.java | 2 +- .../jogamp/opengl/GLGraphicsConfigurationUtil.java | 5 ++--- .../opengl/egl/EGLGraphicsConfiguration.java | 5 +++-- .../egl/EGLGraphicsConfigurationFactory.java | 12 +++++------ .../wgl/WindowsWGLGraphicsConfiguration.java | 24 +++++++++++----------- .../WindowsWGLGraphicsConfigurationFactory.java | 14 ++++++------- .../x11/glx/X11GLXGraphicsConfiguration.java | 7 ++++--- .../glx/X11GLXGraphicsConfigurationFactory.java | 4 ++-- .../media/nativewindow/CapabilitiesChooser.java | 2 +- .../nativewindow/DefaultCapabilitiesChooser.java | 4 ++-- .../test/junit/jogl/caps/MultisampleChooser01.java | 7 ++++++- 13 files changed, 60 insertions(+), 47 deletions(-) diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java index f678c709e..b57b85e5c 100644 --- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java +++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java @@ -102,8 +102,9 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser { final static int STENCIL_MISMATCH_PENALTY_SCALE = 3; final static int MULTISAMPLE_MISMATCH_PENALTY_SCALE = 3; + @Override public int chooseCapabilities(final CapabilitiesImmutable desired, - final List /**/ available, + final List available, final int windowSystemRecommendedChoice) { if ( null == desired ) { throw new NativeWindowException("Null desired capabilities"); @@ -144,7 +145,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser { // Compute score for each for (int i = 0; i < availnum; i++) { - GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i); + final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i); if (cur == null) { continue; } @@ -207,7 +208,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser { if (score == NO_SCORE) { continue; } - GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i); + final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i); if (cur.getHardwareAccelerated()) { int absScore = Math.abs(score); if (!gotHW || @@ -223,7 +224,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser { if (score == NO_SCORE) { continue; } - GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i); + final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i); if (!cur.getHardwareAccelerated()) { if (score <= 0) { score -= maxAbsoluteHWScore; diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java index 73a77de27..5d575c2ee 100644 --- a/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java +++ b/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java @@ -40,17 +40,23 @@ package javax.media.opengl; +import java.util.List; + +import javax.media.nativewindow.CapabilitiesImmutable; import javax.media.nativewindow.CapabilitiesChooser; +import javax.media.opengl.GLCapabilitiesImmutable; + /** Provides a mechanism by which applications can customize the window type selection for a given {@link GLCapabilities}. Developers can implement this interface and pass an instance into the appropriate method of {@link GLDrawableFactory}; the chooser will be called during the OpenGL context creation process. Note that this is only a marker interface; its signature is the same as - {@link CapabilitiesChooser}, but the array of {@link Capabilities} - objects passed to {@link #chooseCapabilities chooseCapabilities} - will actually be an array of {@link GLCapabilities}. */ + {@link CapabilitiesChooser} and the {@link List} of + objects extending {@link CapabilitiesImmutable} + passed to {@link #chooseCapabilities chooseCapabilities} + is actually a {@link List} of type {@link GLCapabilitiesImmutable}. */ public interface GLCapabilitiesChooser extends CapabilitiesChooser { } diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java index 6fe9f080c..5c6b475b2 100644 --- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java @@ -38,7 +38,7 @@ import javax.media.opengl.DefaultGLCapabilitiesChooser; public abstract class GLGraphicsConfigurationFactory extends GraphicsConfigurationFactory { protected static int chooseCapabilities(CapabilitiesChooser chooser, CapabilitiesImmutable capsRequested, - List /**/ availableCaps, int recommendedIndex) { + List availableCaps, int recommendedIndex) { if (null == capsRequested) { throw new NativeWindowException("Null requested capabilities"); } diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java index d7958c7f1..b7c15bfda 100644 --- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java +++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java @@ -28,7 +28,7 @@ package jogamp.opengl; -import java.util.ArrayList; +import java.util.List; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLCapabilitiesImmutable; @@ -87,8 +87,7 @@ public class GLGraphicsConfigurationUtil { return getWinAttributeBits(caps.isOnscreen(), caps.isPBuffer()); } - @SuppressWarnings({ "rawtypes", "unchecked" }) - public static final boolean addGLCapabilitiesPermutations(ArrayList capsBucket, GLCapabilitiesImmutable temp, int winattrbits) { + public static final boolean addGLCapabilitiesPermutations(List capsBucket, GLCapabilitiesImmutable temp, int winattrbits) { int preSize = capsBucket.size(); if( 0 != ( WINDOW_BIT & winattrbits ) ) { GLCapabilities cpy = (GLCapabilities) temp.cloneMutable(); diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java index 875bcb95b..56e7a4d22 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java @@ -38,6 +38,7 @@ package jogamp.opengl.egl; import java.nio.IntBuffer; import java.util.ArrayList; +import java.util.List; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.AbstractGraphicsScreen; @@ -149,7 +150,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple public static EGLGLCapabilities EGLConfig2Capabilities(GLProfile glp, long display, long config, boolean relaxed, boolean onscreen, boolean usePBuffer, boolean forceTransparentFlag) { - ArrayList bucket = new ArrayList(); + List bucket = new ArrayList(); final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); if( EGLConfig2Capabilities(bucket, glp, display, config, winattrmask, forceTransparentFlag) ) { return (EGLGLCapabilities) bucket.get(0); @@ -159,7 +160,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple return null; } - public static boolean EGLConfig2Capabilities(ArrayList capsBucket, + public static boolean EGLConfig2Capabilities(List capsBucket, GLProfile glp, long display, long config, int winattrmask, boolean forceTransparentFlag) { final int allDrawableTypeBits = EGLConfigDrawableTypeBits(display, config); diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java index 904110eb2..5ab2632c6 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java @@ -181,7 +181,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact EGLGraphicsDevice eglDevice = sharedResource.getDevice(); long eglDisplay = eglDevice.getHandle(); - List/**/ availableCaps = null; + List availableCaps = null; IntBuffer numConfigs = Buffers.newDirectIntBuffer(1); if(!EGL.eglGetConfigs(eglDisplay, null, 0, numConfigs)) { @@ -316,7 +316,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact final boolean onscreen = capsChosen.isOnscreen(); final boolean usePBuffer = capsChosen.isPBuffer(); final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); - List/**/ availableCaps = null; + List availableCaps = null; int recommendedIndex = -1; long recommendedEGLConfig = -1; IntBuffer numConfigs = Buffers.newDirectIntBuffer(1); @@ -388,7 +388,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact } if( VisualIDHolder.VID_UNDEFINED != nativeVisualID ) { - List/**/ removedCaps = new ArrayList(); + List removedCaps = new ArrayList(); for(int i=0; i*/ eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, int winattrmask, boolean forceTransparentFlag) { - ArrayList caps = new ArrayList(num); + static List eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, int winattrmask, boolean forceTransparentFlag) { + List caps = new ArrayList(num); for(int i=0; i caps, PrintStream out) { for(int i=0; i bucket = new ArrayList(1); + List bucket = new ArrayList(1); final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); if(AttribList2GLCapabilities(bucket, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits)) { - return bucket.get(0); + return (WGLGLCapabilities) bucket.get(0); } return null; } @@ -372,19 +372,19 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio return pformats; } - static List /**/ wglARBPFIDs2GLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, - long hdc, int[] pfdIDs, GLProfile glp, boolean onscreen, boolean usePBuffer) { + static List wglARBPFIDs2GLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, + long hdc, int[] pfdIDs, GLProfile glp, boolean onscreen, boolean usePBuffer) { final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); return wglARBPFIDs2GLCapabilitiesImpl(sharedResource, hdc, pfdIDs, glp, winattrbits); } - static List /**/ wglARBPFIDs2AllGLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, - long hdc, int[] pfdIDs, GLProfile glp) { + static List wglARBPFIDs2AllGLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, + long hdc, int[] pfdIDs, GLProfile glp) { return wglARBPFIDs2GLCapabilitiesImpl(sharedResource, hdc, pfdIDs, glp, GLGraphicsConfigurationUtil.ALL_BITS); } - private static List /**/ wglARBPFIDs2GLCapabilitiesImpl(WindowsWGLDrawableFactory.SharedResource sharedResource, - long hdc, int[] pfdIDs, GLProfile glp, int winattrbits) { + private static List wglARBPFIDs2GLCapabilitiesImpl(WindowsWGLDrawableFactory.SharedResource sharedResource, + long hdc, int[] pfdIDs, GLProfile glp, int winattrbits) { if (!sharedResource.hasARBPixelFormat()) { return null; } @@ -600,7 +600,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio return val; } - static boolean AttribList2GLCapabilities( ArrayList capsBucket, + static boolean AttribList2GLCapabilities( List capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int[] iattribs, final int niattribs, final int[] iresults, final int winattrmask) { @@ -659,14 +659,14 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio static WGLGLCapabilities PFD2GLCapabilities(GLProfile glp, long hdc, int pfdID, boolean onscreen) { final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, false); - ArrayList capsBucket = new ArrayList(1); + List capsBucket = new ArrayList(1); if( PFD2GLCapabilities(capsBucket, glp, hdc, pfdID, winattrmask) ) { - return capsBucket.get(0); + return (WGLGLCapabilities) capsBucket.get(0); } return null; } - static boolean PFD2GLCapabilities(ArrayList capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int winattrmask) { + static boolean PFD2GLCapabilities(List capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int winattrmask) { PIXELFORMATDESCRIPTOR pfd = createPixelFormatDescriptor(hdc, pfdID); if(null == pfd) { return false; diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index 2c8c03185..850b64aa8 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -115,7 +115,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat WindowsWGLDrawable sharedDrawable = sharedResource.getDrawable(); GLCapabilitiesImmutable capsChosen = sharedDrawable.getChosenGLCapabilities(); WindowsWGLContext sharedContext = sharedResource.getContext(); - List/**/ availableCaps = null; + List availableCaps = null; if ( sharedResource.needsCurrentContext4ARBPFDQueries() ) { if(GLContext.CONTEXT_NOT_CURRENT == sharedContext.makeCurrent()) { @@ -149,15 +149,15 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat return availableCaps; } - static List/**/ getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) { + static List getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) { int[] pformats = WindowsWGLGraphicsConfiguration.wglAllARBPFIDs(sharedResource.getContext(), hdc); return WindowsWGLGraphicsConfiguration.wglARBPFIDs2AllGLCapabilities(sharedResource, hdc, pformats, glProfile); } - static List/**/ getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) { + static List getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) { int[] pformats = WindowsWGLGraphicsConfiguration.wglAllGDIPFIDs(hdc); int numFormats = pformats.length; - ArrayList bucket = new ArrayList(numFormats); + List bucket = new ArrayList(numFormats); for (int i = 0; i < numFormats; i++) { WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(bucket, glProfile, hdc, pformats[i], GLGraphicsConfigurationUtil.ALL_BITS); } @@ -370,7 +370,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat } } - List /**/ availableCaps = + List availableCaps = WindowsWGLGraphicsConfiguration.wglARBPFIDs2GLCapabilities(sharedResource, hdc, pformats, glProfile, onscreen, usePBuffer); if( null == availableCaps || 0 == availableCaps.size() ) { @@ -431,7 +431,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat boolean onscreen = capsChosen.isOnscreen(); GLProfile glProfile = capsChosen.getGLProfile(); - ArrayList availableCaps = new ArrayList(); + List availableCaps = new ArrayList(); int pfdID; // chosen or preset PFD ID WGLGLCapabilities pixelFormatCaps = null; // chosen or preset PFD ID's caps boolean pixelFormatSet = false; // indicates a preset PFD ID [caps] @@ -481,7 +481,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat } return false; } - pixelFormatCaps = availableCaps.get(chosenIndex); + pixelFormatCaps = (WGLGLCapabilities) availableCaps.get(chosenIndex); if (DEBUG) { System.err.println("chosen pfdID (GDI): native recommended "+ (recommendedIndex+1) + ", caps " + pixelFormatCaps); diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java index 0af62394c..b54b5150c 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java @@ -34,6 +34,7 @@ package jogamp.opengl.x11.glx; import java.util.ArrayList; +import java.util.List; import javax.media.nativewindow.GraphicsConfigurationFactory; import javax.media.opengl.DefaultGLCapabilitiesChooser; @@ -253,7 +254,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem static X11GLCapabilities GLXFBConfig2GLCapabilities(GLProfile glp, long display, long fbcfg, boolean relaxed, boolean onscreen, boolean usePBuffer, boolean isMultisampleAvailable) { - ArrayList bucket = new ArrayList(); + ArrayList bucket = new ArrayList(); final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); if( GLXFBConfig2GLCapabilities(bucket, glp, display, fbcfg, winattrmask, isMultisampleAvailable) ) { return (X11GLCapabilities) bucket.get(0); @@ -271,7 +272,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return renderPictFmt.getDirect(); } - static boolean GLXFBConfig2GLCapabilities(ArrayList capsBucket, + static boolean GLXFBConfig2GLCapabilities(List capsBucket, GLProfile glp, long display, long fbcfg, int winattrmask, boolean isMultisampleAvailable) { final int allDrawableTypeBits = FBCfgDrawableTypeBits(display, fbcfg); @@ -388,7 +389,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return res; } - static boolean XVisualInfo2GLCapabilities(ArrayList capsBucket, + static boolean XVisualInfo2GLCapabilities(List capsBucket, GLProfile glp, long display, XVisualInfo info, final int winattrmask, boolean isMultisampleEnabled) { final int allDrawableTypeBits = GLGraphicsConfigurationUtil.WINDOW_BIT | GLGraphicsConfigurationUtil.BITMAP_BIT ; diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java index 0ec2f234c..8377d2453 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java @@ -269,7 +269,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF final boolean isMultisampleAvailable = factory.isGLXMultisampleAvailable(absDevice); int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(capsChosen, true, isMultisampleAvailable, display, screen); int[] count = { -1 }; - ArrayList/**/ availableCaps = new ArrayList(); + List availableCaps = new ArrayList(); final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); // 1st choice: get GLCapabilities based on users GLCapabilities setting recommendedIndex as preferred choice @@ -339,7 +339,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF GLProfile glProfile = capsChosen.getGLProfile(); final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(capsChosen.isOnscreen(), false /* pbuffer */); - ArrayList availableCaps = new ArrayList(); + List availableCaps = new ArrayList(); int recommendedIndex = -1; AbstractGraphicsDevice absDevice = x11Screen.getDevice(); diff --git a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java index a306363dc..e1fdf4938 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java +++ b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java @@ -65,6 +65,6 @@ public interface CapabilitiesChooser { choice to some other CapabilitiesChooser object. */ public int chooseCapabilities(CapabilitiesImmutable desired, - List /**/ available, + List available, int windowSystemRecommendedChoice); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java index 48c4d31ce..9d4b112b1 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java @@ -69,7 +69,7 @@ public class DefaultCapabilitiesChooser implements CapabilitiesChooser { private static final boolean DEBUG = Debug.isPropertyDefined("nativewindow.debug.CapabilitiesChooser", true); public int chooseCapabilities(final CapabilitiesImmutable desired, - final List /**/ available, + final List available, final int windowSystemRecommendedChoice) { if (DEBUG) { System.err.println("Desired: " + desired); @@ -99,7 +99,7 @@ public class DefaultCapabilitiesChooser implements CapabilitiesChooser { } // Compute score for each for (int i = 0; i < availnum; i++) { - CapabilitiesImmutable cur = (CapabilitiesImmutable) available.get(i); + final CapabilitiesImmutable cur = available.get(i); if (cur == null) { continue; } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java index c2182b8b7..efdd2e16d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java @@ -40,12 +40,17 @@ package com.jogamp.opengl.test.junit.jogl.caps; import java.util.List; + +import javax.media.nativewindow.CapabilitiesImmutable; import javax.media.opengl.DefaultGLCapabilitiesChooser; import javax.media.opengl.GLCapabilitiesImmutable; class MultisampleChooser01 extends DefaultGLCapabilitiesChooser { - public int chooseCapabilities(GLCapabilitiesImmutable desired, List/**/ available, int windowSystemRecommendedChoice) { + @Override + public int chooseCapabilities(final CapabilitiesImmutable desired, + final List available, + final int windowSystemRecommendedChoice) { boolean anyHaveSampleBuffers = false; for (int i = 0; i < available.size(); i++) { GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) available.get(i); -- cgit v1.2.3