Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Multi threaded OpenGL
Idan_Bachar last edited by
I've got a problem which I'm not entirely sure why happens but it has something to do with calls to doneCurrent.
I'm using Qt under X and when rendering from a different thread the application sometimes reaches a dead lock on some mutex inside
_XNotify. The thread calls makeCurrent then uses opengl to draw stuff, then swapBuffers and then doneCurrent.
When calling makeCurrent only once and not every render loop the application seems to run fine.
Even when doing the same in the example code provided "here":http://doc.qt.nokia.com/qq/qq06-glimpsing.html#writingmultithreadedglapplications and calling makeCurrent and doneCurrent each time causes it to deadlock.
My question is if there a reason such a thing should happen, that is if calling makeCurrent/doneCurrent each time is not proper usage.
And also general multi thread OpenGL tips are welcomed.