[Interest] Qt on direct compose

Pierre Lamot pierre at videolabs.io
Mon Mar 18 14:32:51 CET 2019


Hello, 

I'm trying to render to  QML to Direct Composition [1] surfaces. 
This can be achieve by getting Qt to render its scene to a special PBO created 
by ANGLE.
I got this part working by following advises from [2] and [3].

Before starting to perform a draw call, DComposition will inform you where it 
expect you to perform your drawing within the texture it gives you, like an 
OpenGL viewport.  In most cases this will be (0,0) and  will works out of the 
box. Though, especially when dealing with small resolution, DComposition will 
recycle its texture and ask you to draw with a different viewport. I didn't find a 
way to specify the viewport on Qt side, it seems to reset it before drawing the 
scene (probably [4]) . 
So my question is, is there any way I can tell Qt what viewport to use?

To make thing more clear, or if this interest someone else, my code is available at [5]

[1] https://docs.microsoft.com/en-us/windows/desktop/api/_directcomp/
[2] https://lists.qt-project.org/pipermail/interest/2015-September/018977.html
[3] https://lists.qt-project.org/pipermail/interest/2015-September/019047.html
[4] https://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickwindow.cpp.html#463	
[5] https://github.com/chubinou/QtOnDirectCompose/

thanks.

--
Pierre Lamot






More information about the Interest mailing list