summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-06-22 10:51:00 (GMT)
committerTrond Kjernåsen <trond.kjernasen@nokia.com>2010-07-02 10:24:47 (GMT)
commit38922774119817f4bf1595b9651f914e5c3d9f02 (patch)
tree55870e86a85c95d22b2115c89d49343dd0767fbc /src/opengl/qgl_p.h
parent9f72c297843459ab22eeb3af048baa9037aa9634 (diff)
downloadQt-38922774119817f4bf1595b9651f914e5c3d9f02.zip
Qt-38922774119817f4bf1595b9651f914e5c3d9f02.tar.gz
Qt-38922774119817f4bf1595b9651f914e5c3d9f02.tar.bz2
More work on GL threading.
Removed QObject inheritance from QGLEngineSharedShaders and made it thread-local, so that paintengines in different threads can use programs without clashing. Lifted some restrictions on QPixmap so that they may be used in threads when the GL2 engine is active. Made the QGLContextGroup a part of the pixmap and image cache keys.
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 16c225f..9b862eb 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -473,6 +473,8 @@ private:
QGLContext *m_ctx;
};
+#include <qdebug.h>
+#include <qthread.h>
class QGLTexture {
public:
QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D,
@@ -489,6 +491,7 @@ public:
~QGLTexture() {
if (options & QGLContext::MemoryManagedBindOption) {
Q_ASSERT(context);
+ qDebug()<< "~QGLTexture: thread:" << hex <<QThread::currentThread() << "(main thread:" << QApplication::instance()->thread() << ")" << "context:" << context << "current context:" << QGLContext::currentContext();
QGLShareContextScope scope(context);
#if defined(Q_WS_X11)
// Although glXReleaseTexImage is a glX call, it must be called while there