[Development] Capturing and overlaying in QtQuick using RHI

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon Feb 17 13:45:36 CET 2025


Hi,

On 17/02/2025 00:15, Jean-Michaël Celerier wrote:
> I think I have something close to that there:
> 
> https://github.com/ossia/score/blob/master/src/plugins/score-plugin-js/JS/Executor/GPUNode.cpp#L284
> 
> Line 289 the rendertarget on which QtQuick is going to be rendered.
> Then the actual rendering is there:
> https://github.com/ossia/score/blob/master/src/plugins/score-plugin-js/JS/Executor/GPUNode.cpp#L370-L426
> 
> Afterwards what's in the render target can be used in further render
> passes like any other texture to have your overlaid content.
> It's not perfect as I haven't been able to make Animators work though,
> but what I'm missing with this is likely not related to QRhi !
> 
> Also I haven't been able to do it without private API
> (https://github.com/ossia/score/blob/master/src/plugins/score-plugin-js/JS/Executor/GPUNode.cpp#L392)
> - if there's any way to do it I'd love to know.
> 
> Cheers, hopefully this helps!

Thanks for the reply. There's unfortunately one further twist I forgot 
to mention: this is for GammaRay, so while that means I'm not afraid of 
using private APIs, I can't really modify the rendering code itself 
(e.g. to reroute it through QQuickRenderControl and "manually advance 
it", like you're doing); I can pretty much only listen to QQuickWindow's 
signals :)

Cheers,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - Trusted Software Excellence

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20250217/d2c703d1/attachment.bin>


More information about the Development mailing list