diff options
author | Sven Gothel <[email protected]> | 2019-11-21 07:33:19 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-11-21 07:33:19 +0100 |
commit | 9b52db212f8749b61e4cf775fe3244b94c5ae41c (patch) | |
tree | 74f1d9d9921c6a2acb668ea679a365a9e892400d /src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java | |
parent | 10d3ba66b725fb44dc2c646c9ddc9816a4d72777 (diff) |
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
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java | 29 |
1 files changed, 18 insertions, 11 deletions
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{ |