View Full Version : multiple contexts in qt/glx?
07-10-2003, 12:43 AM
My project works on a client server architecture. So I need multiple threads and a context in each thread. I am using Qt for my GUI. Since qt is not thread safe(as mentioned in Qt documentation),I thought of creating the context in GLX(GLXCreateContext). IN that case how do i create my Qt widgets in it? Is it possible to mix the two?
Thanx in adv,
I don't know if QT permits to use hidden glx components. Gtk permits it, as glut in some ways.
Well, surely the documentation of QT could tell you more. However, you could look at the QT sources or less QT includes.
If you do it with glx, you'll need to use x I think, or maybe gtk. If you are reluctant with gtk+, you may like to know that gtk-- (or gtkmm) and one other I forgot is in C++ and is GTK+.
I don't know if QT is well or not for threads, but this may not be a problem: use the default Posix threads instead as you're under Linux. Well, if you want to port under Windows, you'll need to port the threads with w32threads I think.
You told you need a context in each thread: this is not true. One context could be hanged by many threads. The only way to do it is to have any of your contexts activated only once (not 1 context activated in 2 thread simultaneously).
sorry to be so fast, I had only a very few time to go on the net.
hope this helps.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.