1
D / Re: Drawing in threads
« on: February 22, 2017, 02:56:29 pm »
I'm not doing any event handing in the thread.
The reason I'm using a separate thread is that I dont want the app to become unreponsive during the animation. There's definitely a possibility to pass a RenderWindow to a thread in SFML. See bottom of page.
http://www.sfml-dev.org/tutorials/2.4/graphics-draw.php
Since I dont need to process input during animation, I've decided to do the animation in the main thread after all. It seems to be working fine.
The reason I'm using a separate thread is that I dont want the app to become unreponsive during the animation. There's definitely a possibility to pass a RenderWindow to a thread in SFML. See bottom of page.
http://www.sfml-dev.org/tutorials/2.4/graphics-draw.php
Since I dont need to process input during animation, I've decided to do the animation in the main thread after all. It seems to be working fine.