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. Quick Scene Graph render another QQuickItem

Quick Scene Graph render another QQuickItem

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 265 Views
  • 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.
  • S Offline
    S Offline
    serhii
    wrote on last edited by
    #1

    Hi.
    I need to make image component with custom geometry (polygon with changeable vertices).
    I made it in the next way. Created class PolygonImage that inherits QQuickItem. This class has properties for vertices and property 'source' of type QQuickItem. And in 'updatePaintNode' method I set the vertices to QSGGeometry geometry, and set texture of the image (source->textureProvider()->texture()) to QSGTextureMaterial material. And in qml I create component PolygonImage and component Image, set the image as source to the PolygonImage, and make the image not visible. And everything works fine, just as I need.
    But now I want to set as source of PolygonImage not simple Image, but image with some effect (some colorization shader). I set property 'layer.enabled' of the image to true, and 'layer.effect' to some shader. And like before set the image as source to the PolygonImage. And if make the image not visible, then the PolygonImage draws nothing. And if make the image visible, then PolygonImage draws what I need, but the image is also shown.
    Is it possible to make it as I need - to render some custom component in QQuickItem? Or maybe there is another way to implement it?
    P.S. I wanted to make it with Quick Scene Graph because AFAIK it would be the best for performance.

    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