Trying to draw QGLWidget in a QML file, only glClear works?



  • 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)
    result:

    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,
    faenil




Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.