2#if defined(SCORE_HAS_GPU_JS)
3#include <Gfx/GfxContext.hpp>
4#include <Gfx/TexturePort.hpp>
7#include <QQuickRhiItem>
8#include <QSGSimpleTextureNode>
12#include <private/qrhi_p.h>
31class TextureSource :
public QQuickRhiItem
33 W_OBJECT(TextureSource)
37 explicit TextureSource(QQuickItem* parent =
nullptr);
41 INLINE_PROPERTY_CREF(QString, process, =
"", process, setProcess, processChanged)
42 INLINE_PROPERTY_CREF(QVariant, port, =
"", port, setPort, portChanged)
44 QQuickRhiItemRenderer* createRenderer()
override;
47 void geometryChange(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
48 void componentComplete()
override;
49 void releaseResources()
override;
51 void handleWindowChanged(QQuickWindow* window);
55 friend class TextureSourceRenderer;
57 bool connectToOutlet();
58 void disconnectFromOutlet();
59 QRhiTexture* extractTextureFromNode();
61 QPointer<Gfx::TextureOutlet> m_outlet{};
62 QPointer<Gfx::DocumentPlugin> m_gfxPlugin{};
65 bool m_isConnected =
false;
TreeNode< DeviceExplorerNode > Node
Definition DeviceNode.hpp:74
Binds the rendering pipeline to ossia processes.
Definition CameraDevice.cpp:24
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12