[Renderer/MG]: Add MobileGlues renderer

Thank you @Tungstend and @Swung0x48 for the help!

Co-authored-by: Tungstend <hanjinlong197@gmail.com>
Co-authored-by: Swung0x48 <swung0x48@outlook.com>

# Conflicts:
#	app_pojavlauncher/src/main/res/values/strings.xml
This commit is contained in:
alexytomi 2025-03-24 01:55:43 +08:00
parent 6eb830ba7a
commit aa4b25ea6f
9 changed files with 15 additions and 4 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "MobileGlues"]
path = MobileGlues
url = https://github.com/MobileGL-Dev/MobileGlues.git

1
MobileGlues Submodule

@ -0,0 +1 @@
Subproject commit f3e9fb7eb30d454c6b1916e620e5d90ffc6f2eb4

0
Task Normal file
View File

View File

@ -155,6 +155,7 @@ android {
gplay {
initWith release
signingConfig signingConfigs.googlePlayBuild
matchingFallbacks = [ 'release' ]
}
}
@ -228,4 +229,6 @@ dependencies {
// implementation 'net.sourceforge.streamsupport:streamsupport-cfuture:1.7.0'
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation project(":MobileGlues")
}

View File

@ -469,6 +469,7 @@ public class JREUtils {
case "opengles3":
renderLibrary = "libgl4es_114.so"; break;
case "vulkan_zink": renderLibrary = "libOSMesa.so"; break;
case "opengles_mobileglues": renderLibrary = "libmobileglues.so"; break;
case "opengles3_ltw" : renderLibrary = "libltw.so"; break;
default:
Log.w("RENDER_LIBRARY", "No renderer selected, defaulting to opengles2");

View File

@ -1,4 +1,4 @@
# NDK_TOOLCHAIN_VERSION := 4.9
APP_PLATFORM := android-21
APP_STL := system
APP_STL := c++_shared
# APP_ABI := armeabi-v7a arm64-v8a x86 x86_64

View File

@ -171,7 +171,7 @@ int pojavInitOpenGL() {
load_vulkan();
setenv("GALLIUM_DRIVER","zink",1);
set_osm_bridge_tbl();
}
} else printf("EGLBridge: Renderer was not configured as a bridge. Consider adding \"opengles\" to the start of renderer name if it crashes");
if(br_init()) {
br_setup_window();
}

View File

@ -3,7 +3,8 @@
<string-array name="renderer">
<item name="1">@string/mcl_setting_renderer_gles2_4</item>
<item name="2">@string/mcl_setting_renderer_vulkan_zink</item>
<item name="3">@string/mcl_setting_renderer_ltw</item>
<item name="2">@string/mcl_setting_renderer_mobileglues</item>
<item name="4">@string/mcl_setting_renderer_ltw</item>
</string-array>
<string-array name="menu_customcontrol">
@ -37,6 +38,7 @@
<string-array name="renderer_values">
<item>opengles2</item> <!-- gl4es_extra 1.1.4 with OpenGL ES 2/"3" -->
<item>vulkan_zink</item> <!-- virglrenderer with OpenGL ES 3 -->
<item>opengles_mobileglues</item>
<item>opengles3_ltw</item>
</string-array>
<string-array name="download_source_names">

View File

@ -19,4 +19,5 @@ include ':jre_lwjgl3glfw'
include ':app_pojavlauncher'
include ':arc_dns_injector'
include ':forge_installer'
include ':forge_installer'
include ':MobileGlues'