From efc00b2f412865b975088002cbe3c927ef662e10 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 23 Nov 2022 14:46:57 -0500 Subject: fix: adjust y position of scissor rectangle --- glow/src/image.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'glow/src/image.rs') diff --git a/glow/src/image.rs b/glow/src/image.rs index 234583e9..955fd1ab 100644 --- a/glow/src/image.rs +++ b/glow/src/image.rs @@ -142,6 +142,7 @@ impl Pipeline { pub fn draw( &mut self, mut gl: &glow::Context, + target_height: u32, transformation: Transformation, _scale_factor: f32, images: &[layer::Image], @@ -192,7 +193,8 @@ impl Pipeline { unsafe { gl.scissor( layer_bounds.x as i32, - layer_bounds.y as i32, + (target_height - (layer_bounds.y + layer_bounds.height)) + as i32, layer_bounds.width as i32, layer_bounds.height as i32, ); -- cgit