Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Trying to draw QGLWidget in a QML file, only glClear works?
faenil last edited by
hi guys, I'm coding a 3d game, I have my working qglwidget, but now I want to embed it into a qml file, to add UI and stuff.
So I made a QDeclarativeItem, copied QGLWidget's paintGL() to paint(...) of the QDeclarativeItem...
then registered the item as a qml Type, and created a simple qml file with that object inside it...(also set a new QGLWidget as QDeclarativeView's viewport)
the glClear which is at the beginning of the paint is called (the screen is cleared with the right color), but the rest of the things are not drawn.
At the end of the paint glGetError returns 0, so there are apparently no glErrors during the paint, but nothing is drawn...
What am I doing wrong?
Thanks in advance,
minimoog77 last edited by
Maybe this will help http://doc.qt.nokia.com/latest/qpainter.html#beginNativePainting