Vulkan: Further swapchain code improvements. (#473)

This commit is contained in:
goeiecool9999 2022-11-11 08:14:38 +01:00 committed by GitHub
parent a0e69ffbbd
commit 4d68446f14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 58 additions and 78 deletions

View file

@ -56,15 +56,9 @@ void VulkanCanvas::OnPaint(wxPaintEvent& event)
void VulkanCanvas::OnResize(wxSizeEvent& event)
{
const wxSize size = GetSize();
if (size.GetWidth() == 0 || size.GetHeight() == 0)
if (size.GetWidth() == 0 || size.GetHeight() == 0)
return;
const wxRect refreshRect(size);
RefreshRect(refreshRect, false);
if (g_renderer == nullptr)
return;
auto vulkan_renderer = VulkanRenderer::GetInstance();
vulkan_renderer->SetSwapchainTargetSize({size.x, size.y}, m_is_main_window);
}