summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-09-24 09:45:39 -0700
committerSven Gothel <[email protected]>2009-09-24 09:45:39 -0700
commit887b14710c5b358b5c6deb5745e141ad099bb60c (patch)
treedf9e24a965740f9fec090cf1e9d7fdc780582dc0 /src/jogl/classes/com/sun/opengl/impl
parentc623c34c4e4b667a2c1bd7351e7b416f815f52ff (diff)
Let the GLCapabilityChooser run over the fallback fixed GLCapabilities [last resort]
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfigurationFactory.java15
1 files changed, 13 insertions, 2 deletions
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]");
}