Show motions-to-latency in performance GUI

This commit is contained in:
Patrick Nicolas
2024-06-19 17:09:24 +02:00
parent 95bd51fc81
commit ae8a6fa6b3
2 changed files with 20 additions and 13 deletions
+17 -12
View File
@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WiVRn 0.15\n" "Project-Id-Version: WiVRn 0.15\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-08 19:06+0200\n" "POT-Creation-Date: 2024-06-19 16:58+0200\n"
"PO-Revision-Date: 2024-05-20 13:00+0200\n" "PO-Revision-Date: 2024-05-20 13:00+0200\n"
"Last-Translator: Guillaume Meunier <guillaume.meunier@centraliens.net>\n" "Last-Translator: Guillaume Meunier <guillaume.meunier@centraliens.net>\n"
"Language: French\n" "Language: French\n"
@@ -129,7 +129,7 @@ msgid "Overlay can be toggled by pressing both thumbsticks"
msgstr "L'affichage peut être basculé en appuyant sur les deux joysticks" msgstr "L'affichage peut être basculé en appuyant sur les deux joysticks"
#: client/scenes/lobby_gui.cpp:456 client/scenes/lobby_gui.cpp:464 #: client/scenes/lobby_gui.cpp:456 client/scenes/lobby_gui.cpp:464
#: client/scenes/stream_stats.cpp:144 #: client/scenes/stream_stats.cpp:141
msgid "CPU time" msgid "CPU time"
msgstr "Temps CPU" msgstr "Temps CPU"
@@ -138,7 +138,7 @@ msgid "CPU time [ms]"
msgstr "Temps CPU [ms]" msgstr "Temps CPU [ms]"
#: client/scenes/lobby_gui.cpp:470 client/scenes/lobby_gui.cpp:478 #: client/scenes/lobby_gui.cpp:470 client/scenes/lobby_gui.cpp:478
#: client/scenes/stream_stats.cpp:146 #: client/scenes/stream_stats.cpp:143
msgid "GPU time" msgid "GPU time"
msgstr "Temps GPU" msgstr "Temps GPU"
@@ -166,19 +166,19 @@ msgstr "À propos"
msgid "Exit" msgid "Exit"
msgstr "Quitter" msgstr "Quitter"
#: client/scenes/stream_stats.cpp:146 #: client/scenes/stream_stats.cpp:143
msgid "Reproject" msgid "Reproject"
msgstr "Reprojection" msgstr "Reprojection"
#: client/scenes/stream_stats.cpp:147 #: client/scenes/stream_stats.cpp:144
msgid "Blit" msgid "Blit"
msgstr "Copie" msgstr "Copie"
#: client/scenes/stream_stats.cpp:149 #: client/scenes/stream_stats.cpp:146
msgid "Download" msgid "Download"
msgstr "Téléchargement" msgstr "Téléchargement"
#: client/scenes/stream_stats.cpp:150 #: client/scenes/stream_stats.cpp:147
msgid "Upload" msgid "Upload"
msgstr "Téléversement" msgstr "Téléversement"
@@ -191,22 +191,27 @@ msgstr "Décodeur {}"
msgid "Timings [ms]" msgid "Timings [ms]"
msgstr "Durées [ms]" msgstr "Durées [ms]"
#: client/scenes/stream_stats.cpp:289 #: client/scenes/stream_stats.cpp:273
msgid "Send" msgid "Send"
msgstr "Envoi" msgstr "Envoi"
#: client/scenes/stream_stats.cpp:290 #: client/scenes/stream_stats.cpp:274
msgid "Receive" msgid "Receive"
msgstr "Réception" msgstr "Réception"
#: client/scenes/stream_stats.cpp:291 #: client/scenes/stream_stats.cpp:275
msgid "Decode" msgid "Decode"
msgstr "Décodage" msgstr "Décodage"
#: client/scenes/stream_stats.cpp:292 #: client/scenes/stream_stats.cpp:276
msgid "Blitted" msgid "Blitted"
msgstr "Copie" msgstr "Copie"
#: client/scenes/stream_stats.cpp:293 #: client/scenes/stream_stats.cpp:277
msgid "Displayed" msgid "Displayed"
msgstr "Affichage" msgstr "Affichage"
#: client/scenes/stream_stats.cpp:293
#, c++-format
msgid "Estimated motion to photons latency: {}ms"
msgstr "Latence mouvement à photons estimée: {}ms"
+3 -1
View File
@@ -22,6 +22,7 @@
#include "stream.h" #include "stream.h"
#include "application.h" #include "application.h"
#include "imgui_internal.h"
#include "implot.h" #include "implot.h"
#include "utils/ranges.h" #include "utils/ranges.h"
#include <cmath> #include <cmath>
@@ -155,7 +156,7 @@ XrCompositionLayerQuad scenes::stream::plot_performance_metrics(XrTime predicted
ImVec2 plot_size = ImVec2( ImVec2 plot_size = ImVec2(
window_size.x / n_cols - style.ItemSpacing.x * (n_cols - 1) / n_cols, window_size.x / n_cols - style.ItemSpacing.x * (n_cols - 1) / n_cols,
window_size.y / n_rows - style.ItemSpacing.y * (n_rows - 1) / n_rows); (window_size.y - ImGui::GetCurrentContext()->FontSize - style.ItemSpacing.y) / n_rows - style.ItemSpacing.y * (n_rows - 1) / n_rows);
ImPlot::PushStyleColor(ImPlotCol_PlotBg, IM_COL32(32, 32, 32, 64)); ImPlot::PushStyleColor(ImPlotCol_PlotBg, IM_COL32(32, 32, 32, 64));
ImPlot::PushStyleColor(ImPlotCol_FrameBg, IM_COL32(0, 0, 0, 0)); ImPlot::PushStyleColor(ImPlotCol_FrameBg, IM_COL32(0, 0, 0, 0));
@@ -289,6 +290,7 @@ XrCompositionLayerQuad scenes::stream::plot_performance_metrics(XrTime predicted
} }
ImPlot::PopStyleColor(5); ImPlot::PopStyleColor(5);
ImGui::Text("%s", fmt::format(_F("Estimated motion to photons latency: {}ms"), tracking_prediction_offset.load() / 1'000'000).c_str());
ImGui::End(); ImGui::End();
return imgui_ctx->end_frame(); return imgui_ctx->end_frame();