[Qt-interest] Multiple QGLWidget texture rendering problem.

Paulo Jnkml paulo.jnkml at gmail.com
Thu Feb 12 23:23:54 CET 2009


Hi,

I'm making this application that uses 3 QGLWidgets in the same window.
On each I just draw a different image on a quad.

I'm using the code from Qt Gl textures tutorial to load QPixmap and bind 
it to the GLWidget.
The 3 Widgets are exactly the same class.
First I set the same pass the same QPixmap to all of them, and they bind 
it to their gl contex.

Only the first one will show the img correctly. The other widgets will 
show just white in place of the texture.

If I don't rebind it, to the widgets not showing, It won't draw the texture.
Just redrawing is not enough, I need to rebind it.

Actually after I rebind once each picture it will work normally from 
there on.

I'm guessing it could be a concurrency problem.
Like the binding of texture to the different widgets at the same time, 
might mess up either the gl driver or Qt gl widget.

I'm using qt 4.5 and the latest nvida drivers 180.27 on linux 2.6.20.



Am I forgetting something?
Does qt needs sometime to bind a pixmap before I can bind it to another 
context?
Anyone has/had a similar problem?
Any ideas?



Thanks
Paulo







More information about the Qt-interest-old mailing list