aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-03-20 05:12:18 +0100
committerSven Gothel <[email protected]>2011-03-20 05:12:18 +0100
commitb7f148db1a2775ee9ea6af3e057995a9185d311e (patch)
tree2ee8168ebd76503ac87552c0146c8e2ecf58cb0a /src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
parent3df74690ffd910314364566a8fd6eb2c8242f96a (diff)
Refine getAvailableGLCapabilitiesImpl (XGL, WGL and EGL): Sort only if size > 1
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java5
1 files changed, 2 insertions, 3 deletions
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;