46 QRhi* producer, QRhi* consumer, QSize size,
47 QRhiTexture::Format format = QRhiTexture::RGBA8);
63 QRhi* producer, QSize size,
64 QRhiTexture::Format format = QRhiTexture::RGBA8);
77 bool setupConsumer(QRhi* consumer);
84 void resize(QSize newSize);
93 bool isValid()
const noexcept;
95 QSize size()
const noexcept;
109 QRhiTextureRenderTarget* beginProducerFrame();
118 QRhiTexture* currentProducerTexture();
130 void endProducerFrame(QRhiCommandBuffer* cb);
135 QRhiRenderPassDescriptor* producerRenderPassDescriptor()
const noexcept;
149 QRhiTexture* acquireConsumerTexture(QRhiCommandBuffer* cb);
151 bool hasNewFrame()
const noexcept;
155 std::unique_ptr<Impl> m_impl;
168 QRhi* producer, QRhi* consumer, QSize size, QRhiTexture::Format format)
172 virtual bool setupProducer(QRhi* producer, QSize size, QRhiTexture::Format format) = 0;
173 virtual bool setupConsumer(QRhi* consumer) = 0;
175 virtual void resize(QSize newSize) = 0;
176 virtual void cleanup() = 0;
177 virtual bool isValid()
const noexcept = 0;
178 virtual bool isProducerReady()
const noexcept = 0;
180 virtual QRhiTextureRenderTarget* beginProducerFrame() = 0;
181 virtual QRhiTexture* currentProducerTexture() = 0;
182 virtual void endProducerFrame(QRhiCommandBuffer* cb) = 0;
183 virtual QRhiRenderPassDescriptor* producerRenderPassDescriptor()
const noexcept = 0;
185 virtual QRhiTexture* acquireConsumerTexture(QRhiCommandBuffer* cb) = 0;
186 virtual bool hasNewFrame()
const noexcept = 0;
187 virtual QSize size()
const noexcept = 0;
Backend-specific implementation interface for GPU-only texture sharing.
Definition TextureShare.hpp:162
GPU-only triple-buffered texture sharing between two QRhi instances in different threads.
Definition TextureShare.hpp:19
Definition TextureShare.cpp:1622