From 16008e4aa8a470a2411c6f513fdfa61824e904c4 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 7 Mar 2019 13:24:56 +0200 Subject: [PATCH] - set viewport dimensions each frame in Vulkan framebuffer This fixes visual artifacts when resolution is changed without a level running, i.e. from menu or fullscreen console --- src/rendering/vulkan/system/vk_framebuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rendering/vulkan/system/vk_framebuffer.cpp b/src/rendering/vulkan/system/vk_framebuffer.cpp index 96496d7d6..7e9e30b4b 100644 --- a/src/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/rendering/vulkan/system/vk_framebuffer.cpp @@ -73,7 +73,6 @@ VulkanFrameBuffer::VulkanFrameBuffer(void *hMonitor, bool fullscreen, VulkanDevi Super(hMonitor, fullscreen) { device = dev; - SetViewportRects(nullptr); InitPalette(); } @@ -580,6 +579,7 @@ void VulkanFrameBuffer::UpdatePalette() void VulkanFrameBuffer::BeginFrame() { + SetViewportRects(nullptr); mScreenBuffers->BeginFrame(screen->mScreenViewport.width, screen->mScreenViewport.height, screen->mSceneViewport.width, screen->mSceneViewport.height); mSaveBuffers->BeginFrame(SAVEPICWIDTH, SAVEPICHEIGHT, SAVEPICWIDTH, SAVEPICHEIGHT); mPostprocess->BeginFrame();