diff options
author | Sven Gothel <[email protected]> | 2011-10-06 04:01:16 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-10-06 04:01:16 +0200 |
commit | a5b73c63005a4b8697c93d22ad82720981dd1146 (patch) | |
tree | db195856aa8b6689edc0bdde43dc4c48a8ed2c73 /src/jogl/classes/jogamp/opengl | |
parent | 48113ca0298ca79473dca73b85ebd4ef1a9cd078 (diff) |
EGL: In case a nativeVisualID is given to match, but none visual IDs are available, ignore the given ID
Fixes Omap3 EGLConfig's which does not have a native visual ID
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java index 36a93f348..8c1cf882c 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java @@ -301,15 +301,21 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact } if(0<=nativeVisualID) { + List/*<EGLGLCapabilities>*/ removedCaps = new ArrayList(); for(int i=0; i<availableCaps.size(); ) { EGLGLCapabilities ecap = (EGLGLCapabilities) availableCaps.get(i); if(ecap.getNativeVisualID()!=nativeVisualID) { - availableCaps.remove(i); + removedCaps.add(availableCaps.remove(i)); } else { i++; } } - if(DEBUG) { + if(0==availableCaps.size()) { + availableCaps = removedCaps; + if(DEBUG) { + System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID ("+nativeVisualID+") no config found, revert to all"); + } + } else if(DEBUG) { System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID ("+nativeVisualID+") got configs: "+availableCaps.size()); } } |