OpenTTD-patches/src/video
Patric Stout 8e0d48a0f6
Fix: [SDL2] simplify what to redraw to prevent tearing (#8685)
When there are a lot of rects to redraw, of which one of the last
ones is almost the full screen, visual tearing happens over the
vertical axis. This is most visible when scrolling the map.

This can be prevented by using less rects. To simplify the situation,
and as solutions like OpenGL need this anyway, keep a single rect
that shows the biggest size that updates everything correctly.

Although this means it needs a bit more time redrawing where it
is strictly seen not needed, it also means less commands have
to be executed in the backend. In the end, this is a trade-off,
and from experiments it seems the approach of this commit gives
a better result.
2021-02-17 21:19:32 +01:00
..
cocoa Fix: VkMapping declarations violated C++ ODR rule. 2021-02-14 23:19:50 +01:00
allegro_v.cpp Fix: VkMapping declarations violated C++ ODR rule. 2021-02-14 23:19:50 +01:00
allegro_v.h Codechange: Use std::string in the driver and blitter selection code. 2020-05-21 20:02:34 +02:00
CMakeLists.txt Codechange: Make codestyle for CMake files consistent for 'control' statements 2020-09-25 14:43:13 +01:00
dedicated_v.cpp Feature: Choose a sensible window size on a fresh OTTD config file. (#8536) 2021-01-14 21:53:06 +01:00
dedicated_v.h Codechange: Use std::string in the driver and blitter selection code. 2020-05-21 20:02:34 +02:00
null_v.cpp Feature: Choose a sensible window size on a fresh OTTD config file. (#8536) 2021-01-14 21:53:06 +01:00
null_v.h Codechange: Use std::string in the driver and blitter selection code. 2020-05-21 20:02:34 +02:00
sdl2_v.cpp Fix: [SDL2] simplify what to redraw to prevent tearing (#8685) 2021-02-17 21:19:32 +01:00
sdl2_v.h Codechange: [SDL2] Rework how palette is updated 2021-01-30 21:43:59 +01:00
sdl_v.cpp Fix: VkMapping declarations violated C++ ODR rule. 2021-02-14 23:19:50 +01:00
sdl_v.h Codechange: Use std::string in the driver and blitter selection code. 2020-05-21 20:02:34 +02:00
video_driver.hpp Feature: Automatic UI and font zoom levels when supported by the OS. 2021-02-14 14:16:40 +01:00
win32_v.cpp Fix: VkMapping declarations violated C++ ODR rule. 2021-02-14 23:19:50 +01:00
win32_v.h Add: [Win32] Automatic zoom level suggestion for Win32 video driver. 2021-02-14 14:16:40 +01:00