Skip to content

Commit

Permalink
Added RenderPass::set_scissor_rect (#815)
Browse files Browse the repository at this point in the history
Added RenderPass::set_scissor_rect
  • Loading branch information
Kurble authored Nov 9, 2020
1 parent 31a433b commit 07f07a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_render/src/pass/render_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub trait RenderPass {
fn set_vertex_buffer(&mut self, start_slot: u32, buffer: BufferId, offset: u64);
fn set_pipeline(&mut self, pipeline_handle: &Handle<PipelineDescriptor>);
fn set_viewport(&mut self, x: f32, y: f32, w: f32, h: f32, min_depth: f32, max_depth: f32);
fn set_scissor_rect(&mut self, x: u32, y: u32, w: u32, h: u32);
fn set_stencil_reference(&mut self, reference: u32);
fn draw(&mut self, vertices: Range<u32>, instances: Range<u32>);
fn draw_indexed(&mut self, indices: Range<u32>, base_vertex: i32, instances: Range<u32>);
Expand Down
4 changes: 4 additions & 0 deletions crates/bevy_wgpu/src/wgpu_render_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ impl<'a> RenderPass for WgpuRenderPass<'a> {
.set_viewport(x, y, w, h, min_depth, max_depth);
}

fn set_scissor_rect(&mut self, x: u32, y: u32, w: u32, h: u32) {
self.render_pass.set_scissor_rect(x, y, w, h);
}

fn set_stencil_reference(&mut self, reference: u32) {
self.render_pass.set_stencil_reference(reference);
}
Expand Down

0 comments on commit 07f07a0

Please sign in to comment.