fix: adjust y position of scissor rectangle
This commit is contained in:
parent
84c5ee7fb2
commit
efc00b2f41
2 changed files with 4 additions and 1 deletions
|
|
@ -130,6 +130,7 @@ impl Backend {
|
||||||
|
|
||||||
self.image_pipeline.draw(
|
self.image_pipeline.draw(
|
||||||
gl,
|
gl,
|
||||||
|
target_height,
|
||||||
scaled,
|
scaled,
|
||||||
scale_factor,
|
scale_factor,
|
||||||
&layer.images,
|
&layer.images,
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ impl Pipeline {
|
||||||
pub fn draw(
|
pub fn draw(
|
||||||
&mut self,
|
&mut self,
|
||||||
mut gl: &glow::Context,
|
mut gl: &glow::Context,
|
||||||
|
target_height: u32,
|
||||||
transformation: Transformation,
|
transformation: Transformation,
|
||||||
_scale_factor: f32,
|
_scale_factor: f32,
|
||||||
images: &[layer::Image],
|
images: &[layer::Image],
|
||||||
|
|
@ -192,7 +193,8 @@ impl Pipeline {
|
||||||
unsafe {
|
unsafe {
|
||||||
gl.scissor(
|
gl.scissor(
|
||||||
layer_bounds.x as i32,
|
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.width as i32,
|
||||||
layer_bounds.height as i32,
|
layer_bounds.height as i32,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue