aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java1
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java5
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java4
4 files changed, 5 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 78c0da6a5..bcaabfc48 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -125,7 +125,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
if (numConfigs[0] > 0) {
GLProfile glp = GLProfile.getDefault(device);
availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs[0], GLGraphicsConfigurationUtil.ALL_BITS);
- if( null != availableCaps ) {
+ if( null != availableCaps && availableCaps.size() > 1) {
Collections.sort(availableCaps, EglCfgIDComparator);
}
}
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index d9f9dccfe..c5e1eac0b 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -65,7 +65,6 @@ import javax.media.opengl.GLProfile;
import com.jogamp.common.JogampRuntimeException;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.common.util.ReflectionUtil;
-import javax.media.opengl.GLCapabilities;
import jogamp.nativewindow.WrappedSurface;
import jogamp.nativewindow.windows.GDI;
import jogamp.nativewindow.windows.GDISurface;
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index fdf10a5ef..f74c2e90d 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -52,7 +52,6 @@ import jogamp.nativewindow.windows.GDI;
import jogamp.nativewindow.windows.PIXELFORMATDESCRIPTOR;
import jogamp.opengl.GLGraphicsConfigurationFactory;
import jogamp.opengl.GLGraphicsConfigurationUtil;
-import jogamp.opengl.SharedResourceRunner;
import java.util.ArrayList;
import java.util.Collections;
@@ -123,14 +122,14 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
if (sharedResource.hasARBPixelFormat()) {
availableCaps = getAvailableGLCapabilitiesARB(hdc, sharedResource, capsChosen.getGLProfile());
}
- if( null == availableCaps || 0 == availableCaps.size() ) {
+ if( null == availableCaps || availableCaps.isEmpty() ) {
availableCaps = getAvailableGLCapabilitiesGDI(hdc, capsChosen.getGLProfile());
}
} finally {
sharedDrawable.unlockSurface();
}
- if( null != availableCaps ) {
+ if( null != availableCaps && availableCaps.size() > 1 ) {
Collections.sort(availableCaps, PfdIDComparator);
}
return availableCaps;
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 319a52c07..b984f1633 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -111,10 +111,10 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
if( sharedResource.isGLXVersionGreaterEqualOneThree() ) {
availableCaps = getAvailableGLCapabilitiesFBConfig(sharedScreen, glp);
}
- if( null == availableCaps || 0 == availableCaps.size() ) {
+ if( null == availableCaps || availableCaps.isEmpty() ) {
availableCaps = getAvailableGLCapabilitiesXVisual(sharedScreen, glp);
}
- if( null != availableCaps ) {
+ if( null != availableCaps && availableCaps.size() > 1 ) {
Collections.sort(availableCaps, XVisualIDComparator);
}
return availableCaps;