From 2ebfd0c7456eff7e9c03d379d1dfbc611dc26672 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 24 Nov 2023 10:54:21 +0000 Subject: renderer: Move to a full Hyprland GL rendering pipeline (#3920) Also updates wlroots --- src/helpers/Monitor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/helpers/Monitor.cpp') diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 20880d8d..833a7a5a 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -643,3 +643,12 @@ void CMonitor::moveTo(const Vector2D& pos) { Vector2D CMonitor::middle() { return vecPosition + vecSize / 2.f; } + +void CMonitor::updateMatrix() { + wlr_matrix_identity(projMatrix.data()); + if (transform != WL_OUTPUT_TRANSFORM_NORMAL) { + wlr_matrix_translate(projMatrix.data(), vecTransformedSize.x / 2.0, vecTransformedSize.y / 2.0); + wlr_matrix_transform(projMatrix.data(), transform); + wlr_matrix_translate(projMatrix.data(), -vecTransformedSize.x / 2.0, -vecTransformedSize.y / 2.0); + } +} \ No newline at end of file -- cgit v1.2.3