From 294abc20603b1f9c53f1379d9c163f80c1aeaeac Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 23 Jul 2022 17:04:22 -0500 Subject: [change] only bother witht the scissor box if the box isn't the app --- src/core/unit.lisp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/core/unit.lisp b/src/core/unit.lisp index e56c01f..8fe6521 100644 --- a/src/core/unit.lisp +++ b/src/core/unit.lisp @@ -14,14 +14,19 @@ (defmethod render :around ((unit unit)) (when (unit-visiblep unit) - (let ((sb - (gl:get* :scissor-box)) - (scale - (application-scale *application*))) - (with-slots (left right top bottom) (unit-region unit) - (gl:scissor (* left scale) (* bottom scale) (* scale (- right left)) (* scale (- top bottom))) - (call-next-method)) - (gl:scissor (aref sb 0) (aref sb 1) (aref sb 2) (aref sb 3))))) + (if (not (eq *application* (unit-region unit))) + (let ((sb + (gl:get* :scissor-box)) + (scale + (application-scale *application*))) + (with-slots (left right top bottom) (unit-region unit) + (gl:scissor (* left scale) + (* bottom scale) + (* scale (- right left)) + (* scale (- top bottom))) + (call-next-method)) + (gl:scissor (aref sb 0) (aref sb 1) (aref sb 2) (aref sb 3))) + (call-next-method)))) (defmethod (setf closer-mop:slot-value-using-class) :after (newval class (unit unit) slot) -- cgit v1.2.3