Using qtquick as texture in 3D
-
I wrote a small demo as described in "Using qt widgets as texture in 3D":http://qt-project.org/forums/viewthread/27903/ to render widgets into opengl textures for using them e.g. as a 3D ui. Now I wonder what would be the best way to achieve this with qt quick 2.0.
In qt5 I didn't find a way to render a qml scene into a pixmap like this:
@
QPainter painter( &pixmap );
scene->render( &painter ); // render ui updates to texture
@I'm not sure how to, but maybe it would be possible to use:
@
QQuickWindow::setRenderTarget(QOpenGLFramebufferObject * fbo)
@Does anyone have an advice or know a better solution?
Thanks.
-
I think
@
QWidget::createWindowContainer()
@in QT5.1 should do it.