From 9b52db212f8749b61e4cf775fe3244b94c5ae41c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 21 Nov 2019 07:33:19 +0100 Subject: Bug 1156: EGL-GBM: Cleanup Code & Replace Newt GBM implementation GBM driver is now under egl/gbm subpackage and has been replaced by bcm_vc_iv boilerplate. Native code is reentrant capable and cleaned up. TODO: EGLDisplayUtil work with SharedResourceRunner --- .../classes/jogamp/opengl/egl/EGLDisplayUtil.java | 29 ++++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'src/jogl/classes/jogamp') diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java index 5adba1703..580a881d1 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java @@ -199,19 +199,26 @@ public class EGLDisplayUtil { } final String nativeWindowType = NativeWindowFactory.getNativeWindowType(false); - int platform = 0; + final int platform; final long eglDisplay; - if(nativeWindowType == NativeWindowFactory.TYPE_X11) { - platform = EGLExt.EGL_PLATFORM_X11_KHR; - }else if(nativeWindowType == NativeWindowFactory.TYPE_ANDROID) { - platform = EGLExt.EGL_PLATFORM_ANDROID_KHR; - }else if(nativeWindowType == NativeWindowFactory.TYPE_GBM){ - platform = EGLExt.EGL_PLATFORM_GBM_MESA; - } else if(nativeWindowType == NativeWindowFactory.TYPE_WAYLAND){ - // TODO - platform = EGLExt.EGL_PLATFORM_WAYLAND_KHR; + switch( nativeWindowType ) { + case NativeWindowFactory.TYPE_X11: + platform = EGLExt.EGL_PLATFORM_X11_KHR; + break; + case NativeWindowFactory.TYPE_ANDROID: + platform = EGLExt.EGL_PLATFORM_ANDROID_KHR; + break; + case NativeWindowFactory.TYPE_GBM: + platform = EGLExt.EGL_PLATFORM_GBM_MESA; + break; + case NativeWindowFactory.TYPE_WAYLAND: + // TODO + platform = EGLExt.EGL_PLATFORM_WAYLAND_KHR; + break; + default: + platform = 0; } - if( platform != 0){ + if( 0 != platform && false ) { eglDisplay = EGL.eglGetPlatformDisplay(platform, nativeDisplay_id, null); } else{ -- cgit v1.2.3