Fix viewport resizing not updating camera aspect ratio

This commit is contained in:
2021-02-11 19:41:24 +01:00
parent 339afdcfa1
commit 8dc50ab279
4 changed files with 22 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
#include "Scene/VulkanGeometry.hpp"
#include "Scene/VulkanNode.hpp"
#include "Scene/VulkanShader.hpp"
#include "Base/UI/IVulkanWindow.hpp"
#include "Host/PlatformProducer.hpp"
#include <stdexcept>
@@ -62,6 +63,7 @@ namespace openVulkanoCpp::Vulkan
void Renderer::Tick()
{
currentImageId = context.swapChain.AcquireNextImage();
scene->GetCamera()->SetSize(context.window->GetWidth(), context.window->GetHeight());
Render();
}