From 887b14710c5b358b5c6deb5745e141ad099bb60c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 24 Sep 2009 09:45:39 -0700 Subject: Let the GLCapabilityChooser run over the fallback fixed GLCapabilities [last resort] --- .../opengl/impl/egl/EGLGraphicsConfigurationFactory.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfigurationFactory.java index e0a025c4a..d05f10e5b 100644 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfigurationFactory.java @@ -146,13 +146,24 @@ public class EGLGraphicsConfigurationFactory extends GraphicsConfigurationFactor fixedCaps.setGreenBits(6); fixedCaps.setBlueBits(5); fixedCaps.setDepthBits(16); + /** fixedCaps.setSampleBuffers(true); - fixedCaps.setNumSamples(4); + fixedCaps.setNumSamples(4); */ if(DEBUG) { System.err.println("trying fixed caps: "+fixedCaps); } - res = eglChooseConfig(eglDisplay, fixedCaps, capabilities, chooser, absScreen, eglSurfaceType); + chosen = -1; + try { + chosen = chooser.chooseCapabilities(fixedCaps, caps, -1); + } catch (NativeWindowException e) { throw new GLException(e); } + if(chosen<0) { + throw new GLException("Graphics configuration chooser fixed failed"); + } + if(DEBUG) { + System.err.println("Choosen fixed "+caps[chosen]); + } + res = eglChooseConfig(eglDisplay, caps[chosen], capabilities, chooser, absScreen, eglSurfaceType); if(null==res) { throw new GLException("Graphics configuration failed [direct caps, eglGetConfig/chooser and fixed-caps]"); } -- cgit v1.2.3