diff options
author | Sven Gothel <[email protected]> | 2009-09-24 09:45:39 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-09-24 09:45:39 -0700 |
commit | 887b14710c5b358b5c6deb5745e141ad099bb60c (patch) | |
tree | df9e24a965740f9fec090cf1e9d7fdc780582dc0 | |
parent | c623c34c4e4b667a2c1bd7351e7b416f815f52ff (diff) |
Let the GLCapabilityChooser run over the fallback fixed GLCapabilities [last resort]
-rwxr-xr-x | README.txt | 2 | ||||
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfigurationFactory.java | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/README.txt b/README.txt index 924f6e438..efb7eb4b1 100755 --- a/README.txt +++ b/README.txt @@ -36,7 +36,7 @@ Pepijn Van Eeckhoudt and Nathan Parker Burg contributed the Java port of the GLU tessellator. Pepijn also contributed the initial version of the FPSAnimator utility class. -User GKW on the javagaming.org forums contributed the substantial port +James Walsh (GKW) contributed the substantial port of the GLU mipmap generation code to Java, as well as robustness fixes in the Windows implementation and other areas. 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]"); } |