Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101373

Item2D node rendered indefinitey on threaded render loop, blocks updates on basic render loop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.2.5, 6.3.1, 6.4.0 Beta1
    • 6.2.3, 6.3
    • Quick: 3D
    • None
    • Linux/Wayland, Windows
    • 65e76c2cc0 (qt/qtquick3d/dev) 007f7b2047 (qt/qtquick3d/6.2) 1fc1f796be (qt/qtquick3d/6.3) 007f7b2047 (qt/tqtc-qtquick3d/6.2) 1fc1f796be (qt/tqtc-qtquick3d/6.3) 007f7b2047 (qt/qtquick3d/6.2) 1fc1f796be (qt/tqtc-qtquick3d/6.3.1)

      The attached View3D has a Node with 2D item.

          Node {
              Rectangle {
                  width: 100
                  height: 100
                  color: hh.hovered ? "lime" : "green"
                  Rectangle {
                      anchors.centerIn: parent
                      width: 50
                      height: 50
                      HoverHandler { id: hh }
                  }
              }
          }
      

      With QSG_RENDER_LOOP=threaded, the 3D scene appears to be updated even if
      nothing dirty.

      With QSG_RENDER_LOOP=basic, camera rotation does not apply to the scene objects.
      Hover handling is also not working.

      I've confirmed this is caused by update() call inside QQuick3DItem2D::updateSpatialNode().

              connect(m_renderer, &QSGAbstractRenderer::sceneGraphChanged, this, &QQuick3DObject::update);
          ...
          m_renderer->setRootNode(m_rootNode);
          m_rootNode->markDirty(QSGNode::DirtyForceUpdate); // Force matrix, clip and opacity update.
          m_renderer->nodeChanged(m_rootNode, QSGNode::DirtyForceUpdate); // Force render list update.
      

      nodeChanged() emits sceneGraphChanged(), which schedules update.

      I'll send patches later.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            yuja Yuya Nishihara
            yuja Yuya Nishihara
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: