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. QQuickItem::updatePaintNode() or QSGNode::preprocess() ?
Forum Updated to NodeBB v4.3 + New Features

QQuickItem::updatePaintNode() or QSGNode::preprocess() ?

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 3.6k 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.
  • A Offline
    A Offline
    Alexey
    wrote on last edited by
    #1

    Hi,
    I see there are two functions for updating content of a custom visual QML item: QQuickItem::updatePaintNode() and QSGNode::preprocess(). In first one we initially create and add new node to the scene graph. But which of them is more preferrable for updating geometry?

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

      Whoa! Nice find :) I knew only about updatePainNode(). I think that since SG stuff is more internal, in general you should focus on updatePaintNode(). This way you can also stay on top of underlying implementation (if you need to change it to a QSGSimpleTexture, for example), and also get a code that is more manageable and is shorter (you just need QQuickItem subclass).

      Just my view, though. If your use case would work better with ::preprocess(), then go for it :)

      (Z(:^

      1 Reply Last reply
      0
      • O Offline
        O Offline
        osfesa
        wrote on last edited by
        #3

        I think the main difference is that QSGNode try to use as many GPU threads as posible. So the performance can be better.

        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