summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java9
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java16
2 files changed, 13 insertions, 12 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
index 580a881d1..a2903e713 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
@@ -208,8 +208,8 @@ public class EGLDisplayUtil {
case NativeWindowFactory.TYPE_ANDROID:
platform = EGLExt.EGL_PLATFORM_ANDROID_KHR;
break;
- case NativeWindowFactory.TYPE_GBM:
- platform = EGLExt.EGL_PLATFORM_GBM_MESA;
+ case NativeWindowFactory.TYPE_EGL_GBM:
+ platform = EGLExt.EGL_PLATFORM_GBM_KHR; // same EGLExt.EGL_PLATFORM_GBM_MESA;
break;
case NativeWindowFactory.TYPE_WAYLAND:
// TODO
@@ -218,7 +218,7 @@ public class EGLDisplayUtil {
default:
platform = 0;
}
- if( 0 != platform && false ) {
+ if( 0 != platform ) {
eglDisplay = EGL.eglGetPlatformDisplay(platform, nativeDisplay_id, null);
}
else{
@@ -226,7 +226,8 @@ public class EGLDisplayUtil {
}
if(DEBUG) {
- System.err.println("EGLDisplayUtil.eglGetDisplay.X: eglDisplay("+EGLContext.toHexString(nativeDisplay_id)+"): "+
+ System.err.println("EGLDisplayUtil.eglGetDisplay.X: eglDisplay("+EGLContext.toHexString(nativeDisplay_id)+") @ "+
+ platform+"/"+nativeWindowType+": "+
EGLContext.toHexString(eglDisplay)+
", "+((EGL.EGL_NO_DISPLAY != eglDisplay)?"OK":"Failed")+", singletonEGLDisplay "+singletonEGLDisplay+" (use "+useSingletonEGLDisplay+")");
}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java
index df1feefc7..23250db25 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java
@@ -87,7 +87,7 @@ public abstract class NativeWindowFactory {
public static final String TYPE_WAYLAND = ".wayland";
/** GBM/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}.*/
- public static final String TYPE_GBM = ".gbm";
+ public static final String TYPE_EGL_GBM = ".egl.gbm";
/** OpenKODE/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}.*/
public static final String TYPE_EGL = ".egl";
@@ -167,24 +167,24 @@ public abstract class NativeWindowFactory {
case HPUX:
default:
if( BcmVCArtifacts.guessVCIVUsed() ) {
- return TYPE_BCM_VC_IV;
+ return TYPE_BCM_VC_IV;
}
- if(guessX()){
- return TYPE_X11;
+ if( guessX() ) {
+ return TYPE_X11;
}
- if(guessWayland()){
+ if( guessWayland() ) {
//TODO
return TYPE_WAYLAND;
}
- if(guessGBM()){
- return TYPE_GBM;
+ if( true || guessGBM() ) { // FIXME
+ return TYPE_EGL_GBM;
}
return TYPE_X11;
}
}
private static boolean guessX() {
- return System.getProperty("DISPLAY") !=null;
+ return System.getProperty("DISPLAY") != null;
}
private static boolean guessWayland() {