From 7ab0c86978d1d92070e8aad001d76ae980979bbe Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 18 Jun 2021 15:14:08 -0400 Subject: [PATCH] Stencil buffer fallback --- core/src/mindustry/graphics/LoadRenderer.java | 10 ++++++++-- gradle.properties | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/graphics/LoadRenderer.java b/core/src/mindustry/graphics/LoadRenderer.java index c15e948285..69e660f79c 100644 --- a/core/src/mindustry/graphics/LoadRenderer.java +++ b/core/src/mindustry/graphics/LoadRenderer.java @@ -38,6 +38,7 @@ public class LoadRenderer implements Disposable{ private FxProcessor fx; private WindowedMean renderTimes = new WindowedMean(20); private BloomFilter bloom; + private boolean renderStencil = true; private long lastFrameTime; { @@ -45,7 +46,12 @@ public class LoadRenderer implements Disposable{ try{ fx = new FxProcessor(Format.rgba8888, 2, 2, false, true); }catch(Exception e){ - fx = new FxProcessor(Format.rgb565, 2, 2, false, true); + try{ + fx = new FxProcessor(Format.rgb565, 2, 2, false, true); + }catch(Exception awful){ + renderStencil = false; + fx = new FxProcessor(Format.rgba8888, 2, 2, false, false); + } } //vignetting is probably too much @@ -179,7 +185,7 @@ public class LoadRenderer implements Disposable{ Lines.poly(w/2, h/2, 4, rad); Lines.poly(w/2, h/2, 4, rad2); - if(assets.isLoaded("tech")){ + if(assets.isLoaded("tech") && renderStencil){ Font font = assets.get("tech"); font.getData().markupEnabled = true; diff --git a/gradle.properties b/gradle.properties index fb172e55f1..257b5544eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,4 +10,4 @@ kapt.include.compile.classpath=false kotlin.stdlib.default.dependency=false #needed for android compilation android.useAndroidX=true -archash=283f2b76f419fc157312b26b1f1eff0de83898e1 +archash=fa51fd94b73e08998a1fa184d3b1782f6f08aa8c