Get OpenXR fully up and running

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-07-09 04:29:40 +03:00
parent ccffc7908a
commit cecea144e4
2 changed files with 1281 additions and 242 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -61,6 +61,9 @@ Vec2<T> operator*(T scalar, Vec2<T> const &v) {
template <typename T = float>
requires std::is_arithmetic_v<T>
struct Rect {
Rect(Vec2<T> pos, Vec2<T> size) : pos(pos), size(size) {}
Rect(T x, T y, T w, T h) : pos({x, y}), size({w, h}) {}
T &x() { return pos.x; }
T &y() { return pos.y; }
T &w() { return size.x; }
@@ -79,8 +82,6 @@ struct Rect {
T &left() { return x(); }
T &top() { return y(); }
Rect(T x, T y, T w, T h) : pos({x, y}), size({w, h}) {}
Vec2<T> pos, size;
};
@@ -190,5 +191,12 @@ std::vector<Math::Rect<T>> subtract_rect(Math::Rect<T> const &src,
return result;
}
template <typename T = float>
requires std::is_arithmetic_v<T>
struct Viewport {
Rect<T> rect;
Vec2<T> depth_limits;
};
} // namespace Math
} // namespace LunarWM