Quote Originally Posted by anthibug View Post
I absolutely know i'm slowing my application by using mutex.
No, by using threads... Contrary to what people think threads tend to slow down execution of code, not speed it up. Unless of course you have more processing units than threads in your application and no other cpu consuming task is running.


But i really don't care here, it's just for launching a camera motion move and having the ability to play/pause that.
What do you use threads for, anyway?

In fact i just tell my gldrawer to draw continously meanwhile the second thread do stuff !
Why should it draw all the time? It doesn't make sense as the movement (not redrawing) depends on the other tasks running on your machine. You should first run a benchmark to determine how fast you can draw and then adjust the timer so that you have a constant frequency of the "game loop" and redraw as often as you know is possible.