new eXperimental option: disable VBO

This commit is contained in:
SerpentSpirale 2021-12-06 22:18:01 +01:00
parent fdc4a86dc9
commit 4219779ce4
4 changed files with 18 additions and 1 deletions

View File

@ -35,6 +35,7 @@ public class LauncherPreferences
public static int PREF_CONTROL_LEFT_OFFSET = 0;
public static boolean PREF_SUSTAINED_PERFORMANCE = false;
public static String PREF_GLES_SHRINK_HACK = "0";
public static boolean PREF_VBO_DISABLE_HACK = false;
public static void loadPreferences(Context ctx) {
@ -65,6 +66,7 @@ public class LauncherPreferences
PREF_CONTROL_LEFT_OFFSET = DEFAULT_PREF.getInt("controlLeftOffset", 0);
PREF_SUSTAINED_PERFORMANCE = DEFAULT_PREF.getBoolean("sustainedPerformance", false);
PREF_GLES_SHRINK_HACK = DEFAULT_PREF.getString("gl4es_shrink_hack", "0");
PREF_VBO_DISABLE_HACK = DEFAULT_PREF.getBoolean("vbo_disable_hack", false);
/*
if (PREF_CUSTOM_JAVA_ARGS.isEmpty()) {

View File

@ -5,6 +5,7 @@ import static net.kdt.pojavlaunch.Architecture.archAsString;
import static net.kdt.pojavlaunch.Architecture.is64BitsDevice;
import static net.kdt.pojavlaunch.Tools.LOCAL_RENDERER;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_GLES_SHRINK_HACK;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_VBO_DISABLE_HACK;
import android.app.*;
import android.content.*;
@ -212,6 +213,9 @@ public class JREUtils {
// The shrink hack can be enabled from the experimental settings
envMap.put("LIBGL_SHRINK", PREF_GLES_SHRINK_HACK);
// VBO disable hack
if(PREF_VBO_DISABLE_HACK) envMap.put("LIBGL_USEVBO","0");
// Fix white color on banner and sheep, since GL4ES 1.1.5
envMap.put("LIBGL_NORMALIZE", "1");

View File

@ -279,8 +279,12 @@
<string name="preference_sustained_performance_description">Limit thermal throttling by limiting peak performance</string>
<string name="preference_back_title">Back to the last screen</string>
<string name="gles_hack_title">GL4ES Shrink hack</string>
<string name="gles_hack_none">Don\'t shrink textures</string>
<string name="gles_hack_always">Divides all textures by 2</string>
<string name="gles_hack_sometimes">Divides big textures by /2 or /4</string>
<string name="vbo_hack_title">Disable VBOs</string>
<string name="vbo_hack_description">Help with compatibility on some old versions</string>
</resources>

View File

@ -5,12 +5,19 @@
<PreferenceCategory android:title="Experimental fuckury">
<androidx.preference.ListPreference
android:title="GL4ES Shrink hack"
android:title="@string/gles_hack_title"
android:key="gl4es_shrink_hack"
android:defaultValue="0"
android:entryValues="@array/hack_gles_shrink_values"
android:entries="@array/hack_gles_shrink"
app2:useSimpleSummaryProvider="true"/>
<SwitchPreference
android:title="@string/vbo_hack_title"
android:summary="@string/vbo_hack_description"
android:defaultValue="false"
android:key="vbo_disable_hack"
/>
</PreferenceCategory>
</PreferenceScreen>