Added -gltrace desktop launch flag
This commit is contained in:
@@ -244,6 +244,7 @@ project(":desktop"){
|
|||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
|
implementation arcModule("extensions:profiling")
|
||||||
implementation arcModule("extensions:discord")
|
implementation arcModule("extensions:discord")
|
||||||
implementation arcModule("natives:natives-filedialogs")
|
implementation arcModule("natives:natives-filedialogs")
|
||||||
implementation arcModule("natives:natives-desktop")
|
implementation arcModule("natives:natives-desktop")
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import arc.discord.*;
|
|||||||
import arc.discord.DiscordRPC.*;
|
import arc.discord.DiscordRPC.*;
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
|
import arc.profiling.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.Log.*;
|
import arc.util.Log.*;
|
||||||
@@ -66,6 +67,18 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
case "antialias" -> samples = 16;
|
case "antialias" -> samples = 16;
|
||||||
case "debug" -> Log.level = LogLevel.debug;
|
case "debug" -> Log.level = LogLevel.debug;
|
||||||
case "maximized" -> maximized = Boolean.parseBoolean(arg[i + 1]);
|
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
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=8904174eec
|
archash=82df0d1a93
|
||||||
|
|||||||
Reference in New Issue
Block a user