diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-08-30 15:50:04 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-08-30 15:51:28 (GMT) |
commit | 519f8bc02aacd632bf0f7e70079e943b6c09ef74 (patch) | |
tree | 3bb777611e0d9186b37efc22e69890b9bcb679b1 | |
parent | a753ba665b4f32303e9af5d8ef1826e0493ccb5f (diff) | |
download | Qt-519f8bc02aacd632bf0f7e70079e943b6c09ef74.zip Qt-519f8bc02aacd632bf0f7e70079e943b6c09ef74.tar.gz Qt-519f8bc02aacd632bf0f7e70079e943b6c09ef74.tar.bz2 |
Doc update: Mention the Qt::AA_X11InitThreads application attribute.
You need to know this if you're going to make threaded GL apps under
X11.
-rw-r--r-- | src/opengl/qgl.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 532c724..d5fdccb 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3610,12 +3610,16 @@ void QGLContextPrivate::setCurrentContext(QGLContext *context) \section1 Threading - It is possible to render into a QGLWidget from another thread, but it - requires that all access to the GL context is safe guarded. The Qt GUI - thread will try to use the context in resizeEvent and paintEvent, so in - order for threaded rendering using a GL widget to work, these functions - need to be intercepted in the GUI thread and handled accordingly in the - application. + It is possible to render into a QGLWidget from another thread, but + it requires that all access to the GL context is safe guarded. The + Qt GUI thread will try to use the context in resizeEvent and + paintEvent, so in order for threaded rendering using a GL widget + to work, these functions need to be intercepted in the GUI thread + and handled accordingly in the application. Under X11, set the + Qt::AA_X11InitThreads application attribute, before you create the + QApplication object, to make the X11 library and GLX calls thread + safe. + \e{OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries.} |