fix: Make renderer autoselect MobileGLues when angelica is found

Angelica exposes GL3.3core by using an FFP emulator they made. They are
the renderer.
This commit is contained in:
tomikun
2026-05-05 22:50:16 +08:00
parent 0e9f75b480
commit 405e370fb3

View File

@@ -419,7 +419,8 @@ public class MainActivity extends BaseActivity implements ControlButtonMenuListe
} catch (RuntimeException ignored){
assetVersion = "legacy";
} // If this fails.. oh well.
// FIXME: Automatic detection should be based on provided hint GLFW_CONTEXT_VERSION_MAJOR and GLFW_CONTEXT_VERSION_MINOR
// Autoselect renderer
if (Tools.LOCAL_RENDERER == null) {
// Preferably we could detect when it is modded and swap to zink however that would also
@@ -427,11 +428,13 @@ public class MainActivity extends BaseActivity implements ControlButtonMenuListe
// experience for no reason. We will compromise with just having users do it themselves.
Tools.LOCAL_RENDERER = "opengles2";
// MobileGlues becomes available post 1.17. It has superior compatibility with mods
// while having fairly similar performance performance compared to GL4ES-based forks.
// while having fairly similar performance compared to GL4ES-based forks.
if(assetVersion.matches("\\d+") || // Should match all digits, which is the modern assetVersioning
"1.17".equals(assetVersion) ||
"1.18".equals(assetVersion) ||
"1.19".equals(assetVersion)) Tools.LOCAL_RENDERER = "opengles_mobileglues";
"1.19".equals(assetVersion) ||
// Angelica gives us GL3.3core on 1.7.10, it's a unique case.
hasMods("angelica")) Tools.LOCAL_RENDERER = "opengles_mobileglues";
}
if(!Tools.checkRendererCompatible(this, Tools.LOCAL_RENDERER)) {
Tools.RenderersList renderersList = Tools.getCompatibleRenderers(this);