From cfafff307703167eff84d02b2dc541832308e522 Mon Sep 17 00:00:00 2001 From: SweetId <2630750+SweetId@users.noreply.github.com> Date: Fri, 24 Nov 2023 17:39:16 +0530 Subject: [PATCH] 3d image now fills the window --- src/NazaraEditor/Editor/UI/MainWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NazaraEditor/Editor/UI/MainWindow.cpp b/src/NazaraEditor/Editor/UI/MainWindow.cpp index a6ec956..c7eebff 100644 --- a/src/NazaraEditor/Editor/UI/MainWindow.cpp +++ b/src/NazaraEditor/Editor/UI/MainWindow.cpp @@ -21,7 +21,8 @@ namespace NzEditor if (ImGui::Begin("MainWindow")) { auto pos = ImGui::GetCursorPos(); - ImGui::Image(GetApplication()->GetEngineTexture()); + auto size = ImGui::GetContentRegionAvail(); + ImGui::Image(GetApplication()->GetEngineTexture(), Nz::Vector2f{ size.x, size.y }); ImGui::SetCursorPos(pos); // everything else will be drawn on top of the texture auto cam = GetApplication()->GetMainCamera();