diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java index d37efc455..6b4a3ea99 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java @@ -28,6 +28,7 @@ package jogamp.opengl.egl; +import java.io.File; import java.util.ArrayList; import java.util.List; @@ -43,6 +44,15 @@ public final class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundl @Override public final List<List<String>> getToolLibNames() { + + // Prefer libGLESv2.so over libGLESv2.so.2 for Broadcom graphics + // when the VC4 DRM driver isn't present + final File vcliblocation = new File( + "/opt/vc/lib/libbcm_host.so"); + final File vc4modlocation = new File( + "/sys/module/vc4"); + final boolean bcm_vc_iv_quirk = vcliblocation.isFile() && !vc4modlocation.isDirectory(); + final List<List<String>> libsList = new ArrayList<List<String>>(); { final List<String> libsGL = new ArrayList<String>(); @@ -63,12 +73,18 @@ public final class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundl libsGL.add("libGLES30"); // ES2: This is the default lib name, according to the spec - libsGL.add("libGLESv2.so.2"); + if (!bcm_vc_iv_quirk) { + libsGL.add("libGLESv2.so.2"); + } // ES2: Try these as well, if spec fails libsGL.add("libGLESv2.so"); libsGL.add("GLESv2"); + if (bcm_vc_iv_quirk) { + libsGL.add("libGLESv2.so.2"); + } + // ES2: Alternative names libsGL.add("GLES20"); libsGL.add("GLESv2_CM"); |