From 3edcc91e40a00a4a9e7924443cf8dcec61d48229 Mon Sep 17 00:00:00 2001 From: Duncan Date: Sat, 23 Jul 2022 21:11:00 +0100 Subject: [PATCH] Fix #17339. Reset Scaleing frame buffers on scale change (#17598) * Fix #17339. Poor visuals due to scalling incorrectly Mistake made during refactor meant that the scaleing framebuffers were kept enabled even though at integer numbers of scale they are not meant to be used. * Update changelog --- distribution/changelog.txt | 1 + src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 54ae1cf1ce..77e58be117 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -8,6 +8,7 @@ - Fix: [#16392] Scenery on sloped surface is placed at wrong height. - Fix: [#16476] The game sometimes crashes when demolishing a maze. - Fix: [#17312] (Flying) Inline Twist appearing under the surface when placed on ground level. +- Fix: [#17339] Distorted visuals when changing scaling factor between integer numbers in OpenGL rendering mode. - Fix: [#17444] “Manta Ray” boats slowed down too much in “Ayers Rock” scenario (original bug). - Fix: [#17503] Parks with staff with an ID of 0 have all staff windows focus on that staff - Fix: [#17553] Crash when moving invention list items to empty list diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index 0f3ada2ed6..7bcd30b97c 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -444,6 +444,8 @@ private: { // Re-create screen framebuffer _screenFramebuffer = std::make_unique(_window); + _smoothScaleFramebuffer.reset(); + _scaleFramebuffer.reset(); if (GetContext()->GetUiContext()->GetScaleQuality() != ScaleQuality::NearestNeighbour) { _scaleFramebuffer = std::make_unique(_width, _height, false, false);