summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/instancing
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-09-24 13:24:08 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-09-26 17:02:05 +0200
commit30e27328e3d6446a343107c96f41324197ed7ef1 (patch)
tree1f621198a46fb8f8ddd6b1549313ff266eeea03b /tests/manual/rhi/instancing
parent06a7aba731a8b0a3027d14b7aa37229d1ed46d32 (diff)
rhi: Unify handling of special cases for scissor and viewport rects
With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative width or height. Everything else is allowed. This is also the semantic we wish to keep for QRhiViewport and QRhiScissor. This raises some problems. For instance, when we do bottom-left - top-left rectangle conversion, the case of partially out of bounds rects needs to be taken into account. Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when the QQuickWindow size is decreased so the content does not fit because that will then start generating negative x, y scissors for clipping (which is perfectly valid but the QRhi backends need to be able to deal with it) Then there is the problem of having to clamp width and height carefully, because some validation layers for some APIs will reject a viewport or scissor with partially out of bounds rectangles. To verify all this, add a new manual test, based on the cubemap one. (cubemap was chosen because that is an ideal test scene as it fills the viewport completely, and so it is visually straightforward when a scissor rectangle is moving around over it) Fixes: QTBUG-78702 Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'tests/manual/rhi/instancing')
0 files changed, 0 insertions, 0 deletions