[fixme] feat(MobileGL): Add options to select MobileGL

This commit is contained in:
tomikun
2026-04-26 22:25:07 +08:00
parent 5bffc4a724
commit ccdc027843
3 changed files with 17 additions and 0 deletions

View File

@@ -240,6 +240,15 @@ public class JREUtils {
envMap.put("MESA_GL_VERSION_OVERRIDE","4.6COMPAT");
envMap.put("MESA_GLSL_VERSION_OVERRIDE","460");
}
if (LOCAL_RENDERER.equals("opengles_mobilegl_gles")){
envMap.put("MOBILEGL_BACKEND_TYPE", "DirectGLES");
}
if (LOCAL_RENDERER.equals("opengles_mobilegl_vk")){
envMap.put("MOBILEGL_BACKEND_TYPE", "DirectVulkan");
}
if (LOCAL_RENDERER.startsWith("opengles_mobilegl_")){
envMap.put("POJAVEXEC_EGL","libMobileGL.so");
}
}
envMap.put("SDL_OPENGL_LIBRARY", graphicsLib);
@@ -503,6 +512,8 @@ public class JREUtils {
renderLibrary = "libng_gl4es.so"; break;
case "vulkan_zink": renderLibrary = "libOSMesa.so"; break;
case "opengles_mobileglues": renderLibrary = "libmobileglues.so"; break;
case "opengles_mobilegl_vk":
case "opengles_mobilegl_gles": renderLibrary = "libMobileGL.so"; break;
case "opengles3_desktopgl_zink_kopper": renderLibrary = "libglxshim.so"; break;
case "opengles3_ltw" : renderLibrary = "libltw.so"; break;
default:

View File

@@ -5,6 +5,8 @@
<item name="1">@string/mcl_setting_renderer_vulkan_kopper_zink</item>
<item name="2">@string/mcl_setting_renderer_vulkan_zink</item>
<item name="3">@string/mcl_setting_renderer_mobileglues</item>
<item name="3">@string/mcl_setting_renderer_mobilegl_gles</item>
<item name="3">@string/mcl_setting_renderer_mobilegl_vk</item>
<item name="4">@string/mcl_setting_renderer_ltw</item>
</string-array>
@@ -41,6 +43,8 @@
<item>opengles3_desktopgl_zink_kopper</item> <!-- Swung's Kopper Zink backport to 23.0.4 -->
<item>vulkan_zink</item> <!-- osmesa 23.0.4 -->
<item>opengles_mobileglues</item>
<item>opengles_mobilegl_gles</item>
<item>opengles_mobilegl_vk</item>
<item>opengles3_ltw</item>
</string-array>
<string-array name="download_source_names">

View File

@@ -69,6 +69,8 @@
<string name="mcl_setting_renderer_ng_gl4es">Krypton Wrapper - (all versions, fast)</string>
<string name="mcl_setting_renderer_vulkan_zink">Zink (Vulkan) - (all versions, mid)</string>
<string name="mcl_setting_renderer_mobileglues">MobileGlues (OpenGL ES) - (1.17+ only, fast)</string>
<string name="mcl_setting_renderer_mobilegl_gles">MobileGL (OpenGL ES) - (1.17+ only, testing) </string>
<string name="mcl_setting_renderer_mobilegl_vk">MobileGL (Vulkan) - (1.17+ only, testing) </string>
<string name="mcl_setting_renderer_ltw">LTW (OpenGL ES 3) - 1.17+ only</string>
<string name="mcl_setting_veroption_release">Release</string>
<string name="mcl_setting_veroption_snapshot">Snapshot</string>