Mix OpenGL and QPainter Rendering in QQuickPaintedItem or QQuickItem
-
hi
is there anyway to do mixed rendering in QtQuick2 ?
I hope to access OpenGL to draw 3d stuff and also handle some common image/path drawing by QPainterlike what we can do in Qt 4.x :
"blog.qt.digia.com/blog/2011/11/21/qt-commercial-support-weekly-4-mixing-opengl-and-qpainter-qt-4-5-x-with-sun-studio-12-2/":"blog.qt.digia.com/blog/2011/11/21/qt-commercial-support-weekly-4-mixing-opengl-and-qpainter-qt-4-5-x-with-sun-studio-12-2/" -
QQuickPaintedItem inherits from QQuickItem, so I suppose you could mix QPainter and Scenegraph calls there. Don't ask me how, though...
-
thanks sierdzio
it looks like the OpenGL context is binded to the entire Scene Graph.
so if I want to customize 3d rendering on a specific QQuickItem( like the concept of customizing QGLwidget )
the possible approach i can think of is to use FBO then wrap as a TextureNode...any better idea ?
-
I think that is more or less official way right now, but I'm far from being an expert in this area.