1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Add frame diagnostics for GLES2 Batch renderer

Added project setting to enable / disable print frame diagnostics every 10 seconds. This prints out a list of batches and info, which is useful to optimize games and identify performance problems.
This commit is contained in:
lawnjelly
2020-04-17 08:44:12 +01:00
parent b6d652367b
commit 72adefa5cf
7 changed files with 139 additions and 20 deletions

View File

@@ -2422,6 +2422,7 @@ VisualServer::VisualServer() {
GLOBAL_DEF("rendering/gles2/batching/light_scissor_area_threshold", 1.0f);
GLOBAL_DEF("rendering/gles2/batching/batch_buffer_size", 16384);
GLOBAL_DEF("rendering/gles2/debug/flash_batching", false);
GLOBAL_DEF("rendering/gles2/debug/diagnose_frame", false);
GLOBAL_DEF_RST("rendering/gles2/debug/use_batching_in_editor", true);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gles2/batching/max_join_item_commands", PropertyInfo(Variant::INT, "rendering/gles2/batching/max_join_item_commands", PROPERTY_HINT_RANGE, "0,65535"));