diff options
author | Sven Gothel <[email protected]> | 2011-08-06 10:07:47 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-06 10:07:47 +0200 |
commit | 2448ef91fddecdd876ac81746e12c2a1291e82fa (patch) | |
tree | 613f0fce988807922aa58fcbf3292ef57ba2ee25 | |
parent | 8c1007f28396956d5ef83fbbbea78e910c1e53bd (diff) |
EGL Fix: Use config-id value, bug override it w/ renderable type
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java index 8de590879..b30089faa 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java @@ -155,10 +155,11 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple return false; } - int[] val = new int[1]; + int[] cfgID = new int[1]; + int[] rType = new int[1]; // get the configID - if(!EGL.eglGetConfigAttrib(display, config, EGL.EGL_CONFIG_ID, val, 0)) { + if(!EGL.eglGetConfigAttrib(display, config, EGL.EGL_CONFIG_ID, cfgID, 0)) { if(DEBUG) { // FIXME: this happens on a ATI PC Emulation .. System.err.println("EGL couldn't retrieve ConfigID for config "+toHexString(config)+", error "+toHexString(EGL.eglGetError())); @@ -166,7 +167,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple return false; } - if(!EGL.eglGetConfigAttrib(display, config, EGL.EGL_RENDERABLE_TYPE, val, 0)) { + if(!EGL.eglGetConfigAttrib(display, config, EGL.EGL_RENDERABLE_TYPE, rType, 0)) { if(DEBUG) { System.err.println("EGL couldn't retrieve EGL_RENDERABLE_TYPE for config "+toHexString(config)+", error "+toHexString(EGL.eglGetError())); } @@ -174,7 +175,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple } EGLGLCapabilities caps = null; try { - caps = new EGLGLCapabilities(config, val[0], glp, val[0]); + caps = new EGLGLCapabilities(config, cfgID[0], glp, rType[0]); } catch (GLException gle) { if(DEBUG) { System.err.println("config "+toHexString(config)+": "+gle); @@ -182,6 +183,8 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple return false; } + int[] val = new int[1]; + // Read the actual configuration into the chosen caps if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_RED_SIZE, val, 0)) { caps.setRedBits(val[0]); |