From e834f906a6967ea4eb153ff5a08f5e66cf84c1b2 Mon Sep 17 00:00:00 2001 From: datacrystals Date: Tue, 10 May 2022 02:49:31 +0000 Subject: [PATCH] Add Vert/Tex Count Displays (#162) --- .../ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp index f4b183c251..336d147a5c 100644 --- a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp +++ b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp @@ -1011,12 +1011,18 @@ void ERS_CLASS_VisualRenderer::DrawViewportOverlay(int Index, ERS_CLASS_SceneMan unsigned long NumVerts = 0; unsigned long NumIndices = 0; unsigned long NumTextures = 0; + unsigned long TotalModels = 0; + unsigned long InstancedModels = 0; double LongestLoadingTime = 0; for (unsigned long i = 0; i < NumModels; i++) { NumVerts += SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalVertices_; NumIndices += SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalIndices_; NumTextures += SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TextureIDs.size(); + TotalModels ++; + if (!SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->IsTemplateModel) { + InstancedModels++; + } if (SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalLoadingTime_ > LongestLoadingTime) { LongestLoadingTime = SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalLoadingTime_; }