From bfec5d6a8d330cb22f992f1d64863d3b55885e39 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Wed, 27 Jul 2022 16:24:49 +0200 Subject: [PATCH] Improve displaying tris/vert count in GPU profiler if value is large --- Source/Editor/Windows/Profiler/GPU.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Editor/Windows/Profiler/GPU.cs b/Source/Editor/Windows/Profiler/GPU.cs index bc706bbeb..94e827095 100644 --- a/Source/Editor/Windows/Profiler/GPU.cs +++ b/Source/Editor/Windows/Profiler/GPU.cs @@ -91,16 +91,19 @@ namespace FlaxEditor.Windows.Profiler { Title = "Draw Calls", TitleBackgroundColor = headerColor, + FormatValue = FormatCountLong, }, new ColumnDefinition { Title = "Triangles", TitleBackgroundColor = headerColor, + FormatValue = FormatCountLong, }, new ColumnDefinition { Title = "Vertices", TitleBackgroundColor = headerColor, + FormatValue = FormatCountLong, }, }, Parent = layout, @@ -116,6 +119,11 @@ namespace FlaxEditor.Windows.Profiler }; } + private static string FormatCountLong(object x) + { + return ((long)x).ToString("###,###,###"); + } + /// public override void Clear() {