summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-06-17 17:51:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-06-17 17:54:06 +0200
commitbed582123c54a4df098c9cdc53019e0d7038eac8 (patch)
tree3f3023eb05ed3a5a2a516e6c68a3e853f103d287 /editor
parent6c33746542f91abc300319cd057839299d17dea5 (diff)
resize lightmap preview
Diffstat (limited to 'editor')
-rw-r--r--editor/imgui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index b8ba4a57..fa833c31 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -206,7 +206,8 @@ void app::draw_lightmap_test()
{
fm_debug_assert(_tested_light != 0);
- ImGui::SetNextWindowSize({1024, 1024});
+ constexpr auto preview_size = ImVec2{512, 512};
+ ImGui::SetNextWindowSize(preview_size);
auto& w = M->world();
auto e_ = w.find_entity(_tested_light);
@@ -234,8 +235,8 @@ void app::draw_lightmap_test()
shader.finish_and_blend_light();
//shader.finish_light_only();
shader.end_accum();
- //ImGui::Image(&shader.scratch_texture(), {1024, 1024});
- ImGui::Image(&shader.accum_texture(), {1024, 1024});
+ //ImGui::Image(&shader.scratch_texture(), preview_size);
+ ImGui::Image(&shader.accum_texture(), preview_size, ImVec2{0, 0}, ImVec2{1, 1});
M->bind();
}
ImGui::End();