From 9fc4f504a2cecb35bde0fb0d6495658e1f6c1705 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Fri, 29 Sep 2023 10:33:20 -0400 Subject: pass label to GLM helper --- src/game.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index 98e9336..d95e43b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -216,12 +216,12 @@ void Game_Tick(double delta) { ECS_Tick_Late(delta); } -void RecordImGui_GLM(glm::mat4 &mat) { +void RecordImGui_GLM(const char *label, glm::mat4 &mat) { float min = -1; float max = 1; for (long i = 0; i < 4; ++i) { ImGui::PushID(i); - ImGui::SliderFloat4("##mat4", &mat[i][0], min, max, "%.3f", ImGuiSliderFlags_NoRoundToFormat); + ImGui::SliderFloat4(label, &mat[i][0], min, max, "%.3f", ImGuiSliderFlags_NoRoundToFormat); ImGui::PopID(); } } @@ -327,11 +327,11 @@ void RecordImGuiUBO() { return; } ImGui::Text("Model"); - RecordImGui_GLM(UBO.model); + RecordImGui_GLM("UBO-model", UBO.model); ImGui::Text("View"); - RecordImGui_GLM(UBO.view); + RecordImGui_GLM("UBO-view", UBO.view); ImGui::Text("Proj"); - RecordImGui_GLM(UBO.proj); + RecordImGui_GLM("UBO-proj", UBO.proj); ImGui::End(); } -- cgit v1.2.3