Set scissoring properly in text::Pipeline
This commit is contained in:
parent
21886d7e9c
commit
ddbf93a82f
2 changed files with 10 additions and 1 deletions
|
|
@ -291,7 +291,8 @@ impl Backend {
|
|||
}
|
||||
|
||||
if !layer.text.is_empty() {
|
||||
self.text_pipeline.render(text_layer, &mut render_pass);
|
||||
self.text_pipeline
|
||||
.render(text_layer, bounds, &mut render_pass);
|
||||
|
||||
text_layer += 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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