Overlaying QML-based view on top of OpenGL-based game (using qtgameenabler)
-
wrote on 4 Mar 2012, 10:13 last edited by
Hi all!
What is the best way to show QML-based view on top of OpenGL-based game? I'm trying to figure out if it is possible to be integrated with qtgameenabler (https://projects.developer.nokia.com/qtgameenabler/browser). I know there is an integration approach using QWidget as mentioned in here: http://doc.qt.nokia.com/4.7-snapshot/qml-integration.html But it seems it will cost me with expensive memory allocation.
Thanks!
Dio
-
wrote on 4 Mar 2012, 10:15 last edited by
I need the QML to show dialogs :-)
-
wrote on 5 Apr 2012, 08:12 last edited by
On top of it, like overpainting, or like a new window? :)
-
wrote on 5 Apr 2012, 10:28 last edited by
just like dialog, a new window on harmattan :-)
-
wrote on 9 May 2012, 06:27 last edited by
I think you can subclass QDeclarativeView (which is a QGraphicsView) and reimplement QGraphicsView::drawBackground() to do your rendering. You might need to call painter->beginNativePainting() and painter->endNativePainting() around your rendering code to let Qt know that the GL state might have changed.