Loading...
Searching...
No Matches
WindowSettings.hpp
1#pragma once
2#include <QPointF>
3#include <QRectF>
4#include <QSize>
5#include <QString>
6
7namespace Gfx
8{
9
11{
12 int width{};
13 int height{};
14 double rate{};
15 bool viewportSize{};
16 bool vsync{};
17};
18
19enum class WindowMode : int
20{
21 Single = 0,
22 Background = 1,
23 MultiWindow = 2
24};
25
27{
28 float width{0.0f}; // Blend width in UV space (0.0 = no blend, 0.15 = 15% of output)
29 float gamma{2.2f}; // Blend curve exponent (1.0 = linear, 2.2 = typical projector)
30};
31
33{
34 QPointF topLeft{0.0, 0.0};
35 QPointF topRight{1.0, 0.0};
36 QPointF bottomLeft{0.0, 1.0};
37 QPointF bottomRight{1.0, 1.0};
38
39 bool isIdentity() const noexcept
40 {
41 constexpr double eps = 1e-6;
42 return qAbs(topLeft.x()) < eps && qAbs(topLeft.y()) < eps
43 && qAbs(topRight.x() - 1.0) < eps && qAbs(topRight.y()) < eps
44 && qAbs(bottomLeft.x()) < eps && qAbs(bottomLeft.y() - 1.0) < eps
45 && qAbs(bottomRight.x() - 1.0) < eps && qAbs(bottomRight.y() - 1.0) < eps;
46 }
47};
48
49enum class OutputLockMode : int
50{
51 Free = 0, // No constraints
52 AspectRatio = 1, // Output window preserves input section aspect ratio
53 OneToOne = 2, // Output window size = input source rect pixels (1:1)
54 FullLock = 3 // Cannot move or resize in graphics scenes
55};
56
58{
59 QRectF sourceRect{0.0, 0.0, 1.0, 1.0}; // UV coords in input texture
60 int screenIndex{-1}; // -1 = default screen
61 QPoint windowPosition{0, 0};
62 QSize windowSize{1280, 720};
63 bool fullscreen{false};
64
65 // Soft-edge blending per side
66 EdgeBlend blendLeft;
67 EdgeBlend blendRight;
68 EdgeBlend blendTop;
69 EdgeBlend blendBottom;
70
71 // 4-corner perspective warp (output UV space)
72 CornerWarp cornerWarp;
73
74 OutputLockMode lockMode{OutputLockMode::Free};
75};
76
77}
Binds the rendering pipeline to ossia processes.
Definition CameraDevice.cpp:30
Definition WindowSettings.hpp:33
Definition WindowSettings.hpp:27
Definition WindowSettings.hpp:58
Definition WindowSettings.hpp:11