31 Q_PROPERTY(TextureSource textureSource READ textureSource WRITE setTextureSource NOTIFY textureSourceChanged FINAL)
32 Q_PROPERTY(QQuick3DRenderPass *renderPass READ renderPass WRITE setRenderPass NOTIFY renderPassChanged FINAL)
33 Q_PROPERTY(AttachmentSelector attachmentSelector READ attachmentSelector WRITE setAttachmentSelector NOTIFY attachmentSelectorChanged FINAL)
34 QML_NAMED_ELEMENT(RenderOutputProvider)
35 QML_ADDED_IN_VERSION(6, 11)
37 enum class TextureSource : quint32
49 enum class AttachmentSelector : quint32
56 Q_ENUM(AttachmentSelector)
58 explicit QQuick3DRenderOutputProvider(QQuick3DObject *parent =
nullptr);
59 TextureSource textureSource()
const;
60 void setTextureSource(TextureSource newTextureSource);
62 QQuick3DRenderPass *renderPass()
const;
63 void setRenderPass(QQuick3DRenderPass *newRenderPass);
65 AttachmentSelector attachmentSelector()
const;
66 void setAttachmentSelector(AttachmentSelector newAttachmentSelector);
69 void textureSourceChanged();
70 void renderPassChanged();
72 void attachmentSelectorChanged();
75 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
76 void markAllDirty() override;
79 enum DirtyType : quint32 {
80 TextureSourceDirty = 0x1,
81 UserPassTextureDirty = 0x2,
84 using DirtyTypeT = std::underlying_type_t<DirtyType>;
85 static constexpr DirtyTypeT AllDirty = 0xffffffff;
87 QQuick3DRenderPass *m_renderPass =
nullptr;
89 TextureSource m_textureSource = TextureSource::None;
90 DirtyTypeT m_dirtyAttributes = AllDirty;
91 void markDirty(DirtyType type);
92 QString m_userPassKey;
93 AttachmentSelector m_attachmentSelector { AttachmentSelector::Attachment0 };