Hi,

On 18/03/2019 14:32, Pierre Lamot wrote:
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?

Maybe there's a small bit of API missing here on QQuickWindow, to specify the viewport that Qt Quick should use when rendering on a FBO? (I'd suggest to open a feature request for this, should be relatively simple to implement...).

Given the codepath that you pasted, there seems to be no way for a custom glViewport in there. And I wouldn't recommend using QSGEngine, the effort is definitely not worth it here.

My 2 c,
--
Giuseppe D'Angelo | giuseppe.dang...@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 - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to