[SOLVED] OpenGL painting inside QML
QML and Qt Quick
2
Posts
1
Posters
936
Views
1
Watching
-
wrote on 30 Jul 2014, 19:54 last edited by
Hello,
I want to create a OpenGL item that is painted under OpenGL like this one: http://qt-project.org/doc/qt-5/qtquick-scenegraph-openglunderqml-example.html but the item described in the tutorial is painted on the whole window. Is there are way to paint only a specific area of the window (meaning the area of the actual item)?
I tried glScissors but it did not work as exspected.
-
wrote on 7 Aug 2014, 07:28 last edited by
I solved it by using a QQuickPaintedItem and implementing my OpenGL calls between painter->beginNativePainting() and painter->endNativePainting() in the paint function.
I had to use a YIntertedFrameBuffer as render target of the QQuickPaintedItem