Set scissoring properly in text::Pipeline

This commit is contained in:
Héctor Ramón Jiménez 2023-02-08 01:23:40 +01:00
parent 21886d7e9c
commit ddbf93a82f
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 10 additions and 1 deletions

View file

@ -187,10 +187,18 @@ impl Pipeline {
pub fn render<'a>(
&'a self,
layer: usize,
bounds: Rectangle<u32>,
render_pass: &mut wgpu::RenderPass<'a>,
) {
let renderer = &self.renderers[layer];
render_pass.set_scissor_rect(
bounds.x,
bounds.y,
bounds.width,
bounds.height,
);
renderer
.render(&self.atlas, render_pass)
.expect("Render text");