aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java29
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{