Debian Codegraph @

tests/manual/qardboard/QardboardFrameGraph.qml

raw
1 // Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 import Qt3D.Core 2.0
5 import Qt3D.Render 2.0
6
7 Viewport {
8 property alias leftCamera: leftCameraSelector.camera
9 property alias rightCamera: rightCameraSelector.camera
10 property alias window: surfaceSelector.surface
11
12 RenderSurfaceSelector {
13 id: surfaceSelector
14
15 // ColorMask is reset by default
16 // By default reset to the default if not specified
17 ClearBuffers {
18 clearColor: "white"
19 buffers: ClearBuffers.ColorDepthBuffer
20 NoDraw {} // We just want to clear the buffers
21 }
22
23 // Draw with left eye
24 Viewport {
25 id: leftViewport
26 normalizedRect: Qt.rect(0, 0, .5, 1)
27
28 CameraSelector {
29 id: leftCameraSelector
30 }
31 }
32
33 // Draw with right eye
34 Viewport {
35 id: rightViewport
36 normalizedRect: Qt.rect(.5, 0, .5, 1)
37
38 CameraSelector {
39 id: rightCameraSelector
40 }
41 }
42 }
43 }