diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java index 5f2b0c227..5dd9f88b2 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java @@ -62,7 +62,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio protected static final int MAX_PFORMATS = 256; protected static final int MAX_ATTRIBS = 256; - private GLCapabilitiesChooser chooser; + private final GLCapabilitiesChooser chooser; private boolean isDetermined = false; private boolean isExternal = false; @@ -370,7 +370,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio } static List <GLCapabilitiesImmutable> wglARBPFIDs2GLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, - AbstractGraphicsDevice device, GLProfile glp, long hdc, int[] pfdIDs, int winattrbits) { + AbstractGraphicsDevice device, GLProfile glp, long hdc, int[] pfdIDs, int winattrbits, boolean onlyFirstValid) { if (!sharedResource.hasARBPixelFormat()) { return null; } @@ -392,6 +392,9 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio final int j = bucket.size() - 1; System.err.println("wglARBPFIDs2GLCapabilities: bucket["+i+" -> "+j+"]: "+caps); } + if( onlyFirstValid ) { + break; + } } else if(DEBUG) { GLCapabilitiesImmutable skipped = AttribList2GLCapabilities(device, glp, hdc, pfdIDs[i], iattributes, niattribs, iresults, GLGraphicsConfigurationUtil.ALL_BITS); System.err.println("wglARBPFIDs2GLCapabilities: bucket["+i+" -> skip]: pfdID "+pfdIDs[i]+", "+skipped+", winattr "+GLGraphicsConfigurationUtil.winAttributeBits2String(null, winattrbits).toString()); |