View Full Version : QGLContext with multiple graphics cards

8th September 2006, 22:52
I have an OpenGL Qt application that renders in two widgets using two different threads ("A" and "B") sharing the same QGLContext. So far this app runs on a Linux system with a single graphics card. I understand that when thread "A" renders in the first widget, thread "B" has to wait intil "A" finishes its work.
I was thinking about speeding up the app by using a system with two graphics cards (PCI Express) and two monitors. Then I don't have to share context and I should be able to use two different contexts for my two widgets. For simplicity, each card drives its own monitor. How would I initialize QGLContext in this case ? Is there a sample code I could use?
I use Linux 2.6/X11/Qt4.1.

9th September 2006, 19:30
If you don't have more than one CPU in your computer, you won't notice any significant difference, as threads won't execute in parallel, hence the two gfx cards won't render at the same time.

11th September 2006, 16:35
We have more than one CPU and need to speed up graphics (as well as computations). One of the requirements is to have one widget always rendering. It is a medical <soft> real-time application and there is a great deal of computations and rendering involved.