mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Workaround for OpenGL renderer viewport panning, turn it into a hybrid
This commit is contained in:
@@ -343,6 +343,11 @@ public:
|
||||
|
||||
void PaintWindows() override
|
||||
{
|
||||
WindowResetVisibilities();
|
||||
|
||||
// Redraw dirty regions before updating the viewports, otherwise
|
||||
// when viewports get panned, they copy dirty pixels
|
||||
DrawAllDirtyBlocks();
|
||||
WindowUpdateAllViewports();
|
||||
DrawAllDirtyBlocks();
|
||||
}
|
||||
@@ -435,7 +440,7 @@ public:
|
||||
|
||||
DrawingEngineFlags GetFlags() override
|
||||
{
|
||||
return DrawingEngineFlag::dirtyOptimisations;
|
||||
return {};
|
||||
}
|
||||
|
||||
void InvalidateImage(uint32_t image) override
|
||||
|
||||
@@ -526,6 +526,10 @@ namespace OpenRCT2
|
||||
WindowDrawAll(dpi, left, top, right, bottom);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
GfxInvalidateScreen();
|
||||
}
|
||||
}
|
||||
|
||||
Viewport view_copy = *viewport;
|
||||
@@ -573,6 +577,10 @@ namespace OpenRCT2
|
||||
DrawPixelInfo& dpi = DrawingEngineGetDpi();
|
||||
ViewportShiftPixels(dpi, w, viewport, x_diff, y_diff);
|
||||
}
|
||||
else
|
||||
{
|
||||
GfxInvalidateScreen();
|
||||
}
|
||||
|
||||
*viewport = view_copy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user