Skip to content

Commit

Permalink
Bug 1156: EGL-GBM: Fix Cleanup (Newt package relocation / hack defaul…
Browse files Browse the repository at this point in the history
…t GBM)

Now: TYPE_EGL_GBM == ".egl.gbm"
  • Loading branch information
sgothel committed Nov 21, 2019
1 parent 9b52db2 commit 9249725
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
Expand Up @@ -208,8 +208,8 @@ private static synchronized long eglGetDisplay(final long nativeDisplay_id) {
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
Expand All @@ -218,15 +218,16 @@ private static synchronized long eglGetDisplay(final long nativeDisplay_id) {
default:
platform = 0;
}
if( 0 != platform && false ) {
if( 0 != platform ) {
eglDisplay = EGL.eglGetPlatformDisplay(platform, nativeDisplay_id, null);
}
else{
eglDisplay = EGL.eglGetDisplay(nativeDisplay_id);
}

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+")");
}
Expand Down
Expand Up @@ -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";
Expand Down Expand Up @@ -167,24 +167,24 @@ private static String _getNativeWindowingType() {
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() {
Expand Down

0 comments on commit 9249725

Please sign in to comment.