Get OpenXR fully up and running
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
		
							
								
								
									
										1511
									
								
								src/LunarWM.cppm
									
									
									
									
									
								
							
							
						
						
									
										1511
									
								
								src/LunarWM.cppm
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user