Set scissoring properly in text::Pipeline
This commit is contained in:
parent
21886d7e9c
commit
ddbf93a82f
2 changed files with 10 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue