Need some light in this dark room: opengl in qtquick2 and threads
wspilot last edited by
I am porting a a Qt C++ application (no qtquick) to Qt 5.1 with qtquick2.
OS is Sailfish, so I am bound to QML/Qtquick.
I am now trying to get some OpenGl running under QML, which works (like http://qt-project.org/doc/qt-5/qtquick-scenegraph-openglunderqml-example.html).
QQuickItem with OpenGL in its paint() function.
The QQuickItem is instantiated within QML.
The documentation says: Warning: The OpenGL rendering code must be thread aware, as the rendering might be happening outside the GUI thread.
I don understand this. Which of the code ends up in a separate thread?
The complete paint() method? Only the gl_ functions and or opengl utility functions?
Next, in my current application I have several classes that 'supply' data for the OpenGl rendering.
How can I supply pointers of these (data) classes to the QQuickItem object (it is not visible with c++)?