beetleskin
2nd February 2011, 14:27
Hi,
I'm working on a project in which I have to draw a QGLWidget with constant 60fps. I addition, some textures within the GL-context are changing frequently.
I want to separate that to tasks into two threads, one for the fast-refreshing GL-context and one for texture update and other things. The last one should be the main QApplication thread. I had two approaches of implementing that structure but both result in the error message: QGLContext::makeCurrent(): Failed.
With the first try I basically followed this tutorial:
http://doc.trolltech.com/qq/qq06-glimpsing.html#writingmultithreadedglapplications
The second one was to wrap the QGLWidget in a thread, constantly calling the widgets updateGL() function.
I didn't come as far as safely updating the textures as I get the error right after initialization.
I'm workin on Ubuntu, so I called XInitThreads() first.
Does someone have an idea why the makeCurrent fails? Or even a better workaround for the general task?
Thanks.
I'm working on a project in which I have to draw a QGLWidget with constant 60fps. I addition, some textures within the GL-context are changing frequently.
I want to separate that to tasks into two threads, one for the fast-refreshing GL-context and one for texture update and other things. The last one should be the main QApplication thread. I had two approaches of implementing that structure but both result in the error message: QGLContext::makeCurrent(): Failed.
With the first try I basically followed this tutorial:
http://doc.trolltech.com/qq/qq06-glimpsing.html#writingmultithreadedglapplications
The second one was to wrap the QGLWidget in a thread, constantly calling the widgets updateGL() function.
I didn't come as far as safely updating the textures as I get the error right after initialization.
I'm workin on Ubuntu, so I called XInitThreads() first.
Does someone have an idea why the makeCurrent fails? Or even a better workaround for the general task?
Thanks.