I am currently working on a project involving drawing a map with highly complex polygons. This map is drawn on a subviewport and displayed by a camera2d.
Things works fine globally, like zooming or moving the map around. However, I have a non-critical but somewhat annoying issue. When the subviewport is resized, the map is redrawn. Drawing the map is slow, but not an issue except in that case (the initial draw taking some time is not a problem). Also, even if the subviewport keeps its size, a window resize causes a redraw. I wonder if there is a way to prevent the redraw. Solutions like rasterizing the map, more generally, implying the loss of the vectorial, infinitely zoomable, nature of the map are ruled-out as current behavior is considered better.
I have tried playing around with the Clear Mode and Update Mode, but the first only reduces the delay and the second resets by itself.
Also, I wonder under which condition I could use multithreading to have a progress bar displayed while another thread is drawing the polygons.
Thanks in advance for your help