From 1e4bfc26e2f220e046f42f7d26c05e4971bc509d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 5 Aug 2015 16:31:36 +0200 Subject: Bug 1062: Utilize 'GLProfile.disableOpenGLDesktop' for EGLDrawableFactory desktop mapping as well. Commit 35622a7cef4a28ce7e32bf008ef331d9a0d9e3e2 introduced GLProfile.disableOpenGLDesktop, as enabled by system property 'jogl.disable.opengldesktop'. Desktop OpenGL shall also be disabled within EGLDrawableFactory. Provide verbose DEBUG info for all disabled desktop OpenGL cases. --- .../jogamp/opengl/egl/EGLDrawableFactory.java | 60 ++++++++++++---------- 1 file changed, 32 insertions(+), 28 deletions(-) (limited to 'src/jogl/classes/jogamp') diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java index 8e2535309..4fecafdfc 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java @@ -284,40 +284,44 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { } // Setup: eglGLnDynamicLookupHelper if( null == eglGLnDynamicLookupHelper ) { - GLDynamicLookupHelper tmp=null; - try { - tmp = new GLDynamicLookupHelper(new EGLGLnDynamicLibraryBundleInfo()); - } catch (final GLException gle) { - if(DEBUG) { - gle.printStackTrace(); + if( !GLProfile.disableOpenGLDesktop ) { + GLDynamicLookupHelper tmp=null; + try { + tmp = new GLDynamicLookupHelper(new EGLGLnDynamicLibraryBundleInfo()); + } catch (final GLException gle) { + if(DEBUG) { + gle.printStackTrace(); + } } - } - if( null != tmp && tmp.isLibComplete() ) { - final boolean ok; - final long _eglInitializeAddress; - if( !eglTableReset ) { - if( true == ( eglTableReset = EGLAcc.resetProcAddressTable(tmp) ) ) { - _eglInitializeAddress = tmp.dynamicLookupFunction(eglInitializeFuncName); - eglInitializeAddress = _eglInitializeAddress; - ok = true; + if( null != tmp && tmp.isLibComplete() ) { + final boolean ok; + final long _eglInitializeAddress; + if( !eglTableReset ) { + if( true == ( eglTableReset = EGLAcc.resetProcAddressTable(tmp) ) ) { + _eglInitializeAddress = tmp.dynamicLookupFunction(eglInitializeFuncName); + eglInitializeAddress = _eglInitializeAddress; + ok = true; + } else { + _eglInitializeAddress = 0; + ok = false; + } } else { - _eglInitializeAddress = 0; - ok = false; + _eglInitializeAddress = tmp.dynamicLookupFunction(eglInitializeFuncName); + ok = _eglInitializeAddress == eglInitializeAddress; } - } else { - _eglInitializeAddress = tmp.dynamicLookupFunction(eglInitializeFuncName); - ok = _eglInitializeAddress == eglInitializeAddress; - } - if( ok ) { - eglGLnDynamicLookupHelper = tmp; - if (DEBUG || GLProfile.DEBUG) { - System.err.println("Info: EGLDrawableFactory: EGL GLn - OK (eglTableReset "+eglTableReset+", eglInitialize 0x"+Long.toHexString(_eglInitializeAddress)+")"); + if( ok ) { + eglGLnDynamicLookupHelper = tmp; + if (DEBUG || GLProfile.DEBUG) { + System.err.println("Info: EGLDrawableFactory: EGL GLn - OK (eglTableReset "+eglTableReset+", eglInitialize 0x"+Long.toHexString(_eglInitializeAddress)+")"); + } + } else if (DEBUG || GLProfile.DEBUG) { + System.err.println("Info: EGLDrawableFactory: EGL GLn - NOPE (GLn proc, eglTableReset "+eglTableReset+", eglInitialize 0x"+Long.toHexString(_eglInitializeAddress)+")"); } } else if (DEBUG || GLProfile.DEBUG) { - System.err.println("Info: EGLDrawableFactory: EGL GLn - NOPE (GLn proc, eglTableReset "+eglTableReset+", eglInitialize 0x"+Long.toHexString(_eglInitializeAddress)+")"); + System.err.println("Info: EGLDrawableFactory: EGL GLn - NOPE (GLn lib)"); } - } else if (DEBUG || GLProfile.DEBUG) { - System.err.println("Info: EGLDrawableFactory: EGL GLn - NOPE (GLn lib)"); + } else if( DEBUG || GLProfile.DEBUG ) { + System.err.println("Info: EGLDrawableFactory: EGL Gln - disabled!"); } } if( null != eglES2DynamicLookupHelper || null != eglES1DynamicLookupHelper || null != eglGLnDynamicLookupHelper ) { -- cgit v1.2.3