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
50 enum class AttachmentSelector : quint32
57 Q_ENUM(AttachmentSelector)
59 explicit QQuick3DRenderOutputProvider(QQuick3DObject *parent =
nullptr);
60 TextureSource textureSource()
const;
61 void setTextureSource(TextureSource newTextureSource);
63 QQuick3DRenderPass *renderPass()
const;
64 void setRenderPass(QQuick3DRenderPass *newRenderPass);
66 AttachmentSelector attachmentSelector()
const;
67 void setAttachmentSelector(AttachmentSelector newAttachmentSelector);
70 void textureSourceChanged();
71 void renderPassChanged();
73 void attachmentSelectorChanged();
76 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *node) override;
77 void markAllDirty() override;
80 enum DirtyType : quint32 {
81 TextureSourceDirty = 0x1,
82 UserPassTextureDirty = 0x2,
85 using DirtyTypeT = std::underlying_type_t<DirtyType>;
86 static constexpr DirtyTypeT AllDirty = 0xffffffff;
88 QQuick3DRenderPass *m_renderPass =
nullptr;
90 TextureSource m_textureSource = TextureSource::None;
91 DirtyTypeT m_dirtyAttributes = AllDirty;
92 void markDirty(DirtyType type);
93 QString m_userPassKey;
94 AttachmentSelector m_attachmentSelector { AttachmentSelector::Attachment0 };