aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java')
-rwxr-xr-xsrc/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java
index bb341ec52..11ed21f6c 100755
--- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java
@@ -75,7 +75,7 @@ public abstract class EGLDrawable extends GLDrawableImpl {
public abstract GLContext createContext(GLContext shareWith);
- protected abstract long createSurface(long eglDpy, _EGLConfig eglNativeCfg);
+ protected abstract long createSurface(long eglDpy, _EGLConfig eglNativeCfg, long surfaceHandle);
private void recreateSurface() {
if(ownEGLSurface) {
@@ -88,10 +88,13 @@ public abstract class EGLDrawable extends GLDrawableImpl {
System.err.println("createSurface using eglDisplay 0x"+Long.toHexString(eglDisplay)+", "+eglConfig);
}
- eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig());
+ eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), component.getSurfaceHandle());
+ if (EGL.EGL_NO_SURFACE==eglSurface) {
+ throw new GLException("Creation of window surface failed: "+eglConfig+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+ }
if(DEBUG) {
- System.err.println("setSurface using component: handle 0x"+Long.toHexString(component.getWindowHandle())+" -> 0x"+Long.toHexString(eglSurface));
+ System.err.println("setSurface using component: handle 0x"+Long.toHexString(component.getSurfaceHandle())+" -> 0x"+Long.toHexString(eglSurface));
}
}
}
@@ -171,6 +174,17 @@ public abstract class EGLDrawable extends GLDrawableImpl {
} else if(DEBUG) {
System.err.println("Chosen eglConfig: "+eglConfig);
}
+ /**
+ eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), component.getSurfaceHandle());
+ while ( EGL.EGL_NO_SURFACE == eglSurface ) {
+ - blacklist EGLConfig entry
+ - retry ..
+ if ( no more EGLConfigs available ) {
+ break .. or .. exception
+ }
+ eglConfig.updateGraphicsConfiguration();
+ eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), component.getSurfaceHandle());
+ } */
}
recreateSurface();
} finally {