PDA

View Full Version : OpenGL rendering and threads



brcain
19th June 2008, 22:07
Hello,

Do OpenGL calls have to be issued in the main thread (e.g. the same thread as the QGLWidget)?

I know the cull traversal and the render-graph generation can be done in a separate thread. Then the render-graph could be processed in the main thread if needed (e.g. in QGLWidget::paintGL).

Much thanks,
Ben

jacek
26th June 2008, 00:08
Qt docs say that QGLContext isn't thread safe, so I'm not sure if you can find a way to safely activate the context in another thread.

anthibug
3rd July 2008, 09:45
I found something very interesting about that : http://apsy.gse.uni-magdeburg.de/main/index.psp?sec=1&page=hanke/threadedcube&lang=de

The examples provided work great (i tried the qt 4.4 example without any problem).

Unfortunately it's in deutch, but code comments are in english if I remember.