From 38baef0371fc55405779590d503f6e0de10fa9cc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 23 Jan 2015 15:13:10 +0100 Subject: Bug 896: Refine criteria to allow OpenGL API usage for EGL It has been experienced w/ Mesa 10.3.2 (EGL 1.4/Gallium) that even though initial OpenGL context can be created w/o 'EGL_KHR_create_context', switching the API via 'eglBindAPI(EGL_OpenGL_API)' the latter 'eglCreateContext(..)' fails w/ EGL_BAD_ACCESS. Hence we require both: OpenGL API support _and_ 'EGL_KHR_create_context'. FIXME: Evaluate this issue in more detail! FIXME: Utilization of eglBindAPI(..) must be re-evaluated in case we mix ES w/ OpenGL, see EGL 1.4 spec. This is due to new semantics, i.e. API is bound on a per thread base, hence it must be switched before makeCurrent w/ different APIs, see: eglWaitClient(); --- src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java') diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java index 92e13dc61..1af7ffaa0 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java @@ -51,7 +51,7 @@ import com.jogamp.opengl.egl.EGL; * */ public class EGLUpstreamSurfaceHook implements UpstreamSurfaceHook.MutableSize { - protected static final boolean DEBUG = EGLDrawableFactory.DEBUG; + private static final boolean DEBUG = EGLDrawableFactory.DEBUG; private final NativeSurface upstreamSurface; private final UpstreamSurfaceHook.MutableSize upstreamSurfaceHookMutableSize; @@ -231,8 +231,8 @@ public class EGLUpstreamSurfaceHook implements UpstreamSurfaceHook.MutableSize { @Override public final void destroy(final ProxySurface surface) { - if(EGLDrawableFactory.DEBUG) { - System.err.println("EGLUpstreamSurfaceHook.destroy("+surface.getClass().getSimpleName()+"): "+this); + if(DEBUG) { + System.err.println(getThreadName() + ": EGLUpstreamSurfaceHook.destroy("+surface.getClass().getSimpleName()+"): "+this); } surface.clearUpstreamOptionBits( ProxySurface.OPT_PROXY_OWNS_UPSTREAM_SURFACE ); if(upstreamSurface instanceof ProxySurface) { -- cgit v1.2.3