Hello there,
I have two threads, one drawing a sprite to the screen at 30 Hz, the other drawing to a RenderTexture at 1 Hz.
The thread drawing to the RenderTexture has a lot of work to do, so whilst it is drawing, the first thread draws an unfinished sprite to the screen. This can be seen as half of what's being drawn, flickers.
I see that the sprite holds a reference to the renderTexture's texture, and I don't want to sf::Mutex::Lock the entire clear()-display() part of the second thread, that'd take too much time. So therefore I want one sprite that is always complete, and gets updated after finishing drawing to the rendertexture, to avoid the flickering.
How do I do this?