Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Mix OpenGL and QPainter Rendering in QQuickPaintedItem or QQuickItem
Qt 6.11 is out! See what's new in the release blog

Mix OpenGL and QPainter Rendering in QQuickPaintedItem or QQuickItem

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tirth
    wrote on last edited by
    #1

    hi

    is there anyway to do mixed rendering in QtQuick2 ?
    I hope to access OpenGL to draw 3d stuff and also handle some common image/path drawing by QPainter

    like what we can do in Qt 4.x :
    "blog.qt.digia.com/blog/2011/11/21/qt-commercial-support-weekly-4-mixing-opengl-and-qpainter-qt-4-5-x-with-sun-studio-12-2/":"blog.qt.digia.com/blog/2011/11/21/qt-commercial-support-weekly-4-mixing-opengl-and-qpainter-qt-4-5-x-with-sun-studio-12-2/"

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      QQuickPaintedItem inherits from QQuickItem, so I suppose you could mix QPainter and Scenegraph calls there. Don't ask me how, though...

      (Z(:^

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tirth
        wrote on last edited by
        #3

        thanks sierdzio

        it looks like the OpenGL context is binded to the entire Scene Graph.

        so if I want to customize 3d rendering on a specific QQuickItem( like the concept of customizing QGLwidget )
        the possible approach i can think of is to use FBO then wrap as a TextureNode.

        ..any better idea ?

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          I think that is more or less official way right now, but I'm far from being an expert in this area.

          (Z(:^

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved