diff options
-rw-r--r-- | make/make.jogl.cdcfp.linux-x86.sh | 1 | ||||
-rwxr-xr-x | src/classes/com/sun/opengl/impl/egl/EGLDrawable.java | 22 |
2 files changed, 22 insertions, 1 deletions
diff --git a/make/make.jogl.cdcfp.linux-x86.sh b/make/make.jogl.cdcfp.linux-x86.sh index 3c87aa004..d1025ea99 100644 --- a/make/make.jogl.cdcfp.linux-x86.sh +++ b/make/make.jogl.cdcfp.linux-x86.sh @@ -5,6 +5,7 @@ # -Dc.compiler.debug=true # -Djavacdebug="false" # -Djavacdebuglevel="" +# -Djava.generate.skip=true ant -v \ -Djavacdebug="false" \ diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java index 60aed64be..c18af5a89 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java @@ -51,7 +51,6 @@ public class EGLDrawable extends GLDrawableImpl { GLCapabilities capabilities, GLCapabilitiesChooser chooser) throws GLException { super(factory, component, false); - setChosenGLCapabilities(capabilities); this.chooser = chooser; surface=EGL.EGL_NO_SURFACE; @@ -75,6 +74,27 @@ public class EGLDrawable extends GLDrawableImpl { throw new GLException("No valid graphics configuration selected from eglChooseConfig"); } config = configs[0]; + // Read the actual configuration into the choosen caps + int[] val = new int[1]; + if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_RED_SIZE, val, 0)) { + capabilities.setRedBits(val[0]); + } + if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_GREEN_SIZE, val, 0)) { + capabilities.setGreenBits(val[0]); + } + if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_BLUE_SIZE, val, 0)) { + capabilities.setBlueBits(val[0]); + } + if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_ALPHA_SIZE, val, 0)) { + capabilities.setAlphaBits(val[0]); + } + if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_STENCIL_SIZE, val, 0)) { + capabilities.setStencilBits(val[0]); + } + if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_DEPTH_SIZE, val, 0)) { + capabilities.setDepthBits(val[0]); + } + setChosenGLCapabilities(capabilities); } public long getDisplay() { |