diff options
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java | 9 | ||||
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java | 12 |
2 files changed, 14 insertions, 7 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 /*<CapabilitiesImmutable>*/ available, + final List<? extends CapabilitiesImmutable> 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 { } |