Added -gltrace desktop launch flag

This commit is contained in:
Anuken
2025-07-23 11:41:16 -04:00
parent 3e50f1be5f
commit 697396d1c6
3 changed files with 15 additions and 1 deletions
+1
View File
@@ -244,6 +244,7 @@ project(":desktop"){
dependencies{
implementation project(":core")
implementation arcModule("extensions:profiling")
implementation arcModule("extensions:discord")
implementation arcModule("natives:natives-filedialogs")
implementation arcModule("natives:natives-desktop")
@@ -8,6 +8,7 @@ import arc.discord.*;
import arc.discord.DiscordRPC.*;
import arc.files.*;
import arc.math.*;
import arc.profiling.*;
import arc.struct.*;
import arc.util.*;
import arc.util.Log.*;
@@ -66,6 +67,18 @@ public class DesktopLauncher extends ClientLauncher{
case "antialias" -> samples = 16;
case "debug" -> Log.level = LogLevel.debug;
case "maximized" -> maximized = Boolean.parseBoolean(arg[i + 1]);
case "gltrace" -> {
Events.on(ClientCreateEvent.class, e -> {
var profiler = new GLProfiler(Core.graphics);
profiler.enable();
Core.app.addListener(new ApplicationListener(){
@Override
public void update(){
profiler.reset();
}
});
});
}
}
}
}
+1 -1
View File
@@ -26,4 +26,4 @@ org.gradle.caching=true
org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000
android.enableR8.fullMode=false
archash=8904174eec
archash=82df0d1a93