Skip to content

Commit

Permalink
Add Vert/Tex Count Displays (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
datacrystals committed May 10, 2022
1 parent a91acf0 commit 3e302ec
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,21 @@ void ERS_CLASS_VisualRenderer::DrawViewportOverlay(int Index, ERS_CLASS_SceneMan
if (Viewports_[Index]->ShowSceneInfo_) {

// Generate Info
std::string VertexMessage = std::string("");
unsigned long NumModels = SceneManager->Scenes_[SceneManager->ActiveScene_]->Models.size();
unsigned long NumVerts = 0;
unsigned long NumIndices = 0;
unsigned long NumTextures = 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_;
if (SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalLoadingTime_ > LongestLoadingTime) {
LongestLoadingTime = SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalLoadingTime_;
}
NumTextures += SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->Textures_Loaded;
}
std::string VertexMessage = std::string("");

ImGui::Text("A Test Message!");

Expand Down

0 comments on commit 3e302ec

Please sign in to comment.