SFML community forums
General => General discussions => Topic started by: danw on September 19, 2016, 08:55:20 pm
-
I have a question before I spend time converting a large program from SDL to SFML.
I read this document:
http://www.sfml-dev.org/tutorials/2.0/graphics-draw.php#drawing-from-threads
I need to process input in a "main" game loop. I need very low latency on handling input events (<1ms). If I am processing input in a render thread that is using vsync, then I'm only updating every 16ms, and that is 16 times too slow.
So, can somebody please tell me for certain if I can render graphics to a window in one thread, and handle input (keyboard presses etc) in another thread?
-
Well, this question seems dumb in retrospect. I can easily make a small test program to find out.
-
So you found the tutorial, which demonstrates a piece of code that does exactly what you want. So... why do you ask? ;)
-
So you found the tutorial, which demonstrates a piece of code that does exactly what you want. So... why do you ask? ;)
Sorry, I would delete it if I could.
I'm just being paranoid. I did a simple test and it works as advertised.