Skip to content

Commit 53bdae9

Browse files
committed
fix: Make renderer autoselect MobileGLues when angelica is found
Angelica exposes GL3.3core by using an FFP emulator they made. They are the renderer.
1 parent a465077 commit 53bdae9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/MainActivity.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,19 +419,22 @@ private void runCraft(String versionId, JMinecraftVersionList.Version version) t
419419
} catch (RuntimeException ignored){
420420
assetVersion = "legacy";
421421
} // If this fails.. oh well.
422-
422+
423+
// FIXME: Automatic detection should be based on provided hint GLFW_CONTEXT_VERSION_MAJOR and GLFW_CONTEXT_VERSION_MINOR
423424
// Autoselect renderer
424425
if (Tools.LOCAL_RENDERER == null) {
425426
// Preferably we could detect when it is modded and swap to zink however that would also
426427
// cover optifine and vanilla+ configurations which are relatively common, degrading their
427428
// experience for no reason. We will compromise with just having users do it themselves.
428429
Tools.LOCAL_RENDERER = "opengles2";
429430
// MobileGlues becomes available post 1.17. It has superior compatibility with mods
430-
// while having fairly similar performance performance compared to GL4ES-based forks.
431+
// while having fairly similar performance compared to GL4ES-based forks.
431432
if(assetVersion.matches("\\d+") || // Should match all digits, which is the modern assetVersioning
432433
"1.17".equals(assetVersion) ||
433434
"1.18".equals(assetVersion) ||
434-
"1.19".equals(assetVersion)) Tools.LOCAL_RENDERER = "opengles_mobileglues";
435+
"1.19".equals(assetVersion) ||
436+
// Angelica gives us GL3.3core on 1.7.10, it's a unique case.
437+
hasMods("angelica")) Tools.LOCAL_RENDERER = "opengles_mobileglues";
435438
}
436439
if(!Tools.checkRendererCompatible(this, Tools.LOCAL_RENDERER)) {
437440
Tools.RenderersList renderersList = Tools.getCompatibleRenderers(this);

0 commit comments

Comments
 (0)