Important: Please read the Qt Code of Conduct -

Rendering plugin QtQuick 2.0

  • Hello everyone,

    So I'm writing a QML application which needs to display some custom OpenGL 2D rendering.
    This OpenGL is encapsulated in a library, and mainly what I need to do is a call to myLibDraw().

    Coming from a 4.8.4 background (we had a similar application), we wrote the plugin as a QQuickPaintedItem
    which calls myLibDraw() in his paint() virtual function.

    Now the doc states :
    " Using QQuickPaintedItem uses an indirect 2D surface to render its content, either using software rasterization or using an OpenGL framebuffer object (FBO), so the rendering is a two-step operation. First rasterize the surface, then draw the surface. Using scene graph API directly is always significantly faster."

    Long story short, QQuickPaintedItem is always slower than SceneGraph. So we dug a bit but couldn't find any example of such an application (having an external library doing the rendering) done the Scene Graph way.

    So is this possible? And if it is, is there any example out there?)

    Thanks in advance!

  • It is certainly possible. An example you might find interesting is "customgeometry":

    There are also some other relevant examples such as "textureinsgnode" in the "scenegraph" folder of your QtDeclarative examples directory if you have those installed.

Log in to reply