diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-09-29 10:33:20 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-09-29 10:33:20 -0400 |
| commit | 9fc4f504a2cecb35bde0fb0d6495658e1f6c1705 (patch) | |
| tree | 9e00d3466600ff5d5a2b6f5e607332c09548a83c /src | |
| parent | 79904211a2c9f1cae9179540d4784d73fd41ed37 (diff) | |
pass label to GLM helper
Diffstat (limited to 'src')
| -rw-r--r-- | src/game.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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(); } |
