diff options
Diffstat (limited to 'wgpu/src/triangle')
-rw-r--r-- | wgpu/src/triangle/gradient.rs | 8 | ||||
-rw-r--r-- | wgpu/src/triangle/solid.rs | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/wgpu/src/triangle/gradient.rs b/wgpu/src/triangle/gradient.rs index 03332234..b06cbac6 100644 --- a/wgpu/src/triangle/gradient.rs +++ b/wgpu/src/triangle/gradient.rs @@ -245,6 +245,13 @@ impl Pipeline { self.color_stops_pending_write.color_stops.clear(); } + pub fn set_render_pass_pipeline<'a>( + &'a self, + render_pass: &mut wgpu::RenderPass<'a>, + ) { + render_pass.set_pipeline(&self.pipeline); + } + /// Configures the current render pass to draw the gradient at its offset stored in the /// [DynamicBuffer] at [index]. pub fn configure_render_pass<'a>( @@ -252,7 +259,6 @@ impl Pipeline { render_pass: &mut wgpu::RenderPass<'a>, count: usize, ) { - render_pass.set_pipeline(&self.pipeline); render_pass.set_bind_group( 0, &self.bind_group, diff --git a/wgpu/src/triangle/solid.rs b/wgpu/src/triangle/solid.rs index 6b5dad41..2e1052f2 100644 --- a/wgpu/src/triangle/solid.rs +++ b/wgpu/src/triangle/solid.rs @@ -147,6 +147,13 @@ impl Pipeline { self.buffer.write(device, staging_belt, encoder); } + pub fn set_render_pass_pipeline<'a>( + &'a self, + render_pass: &mut wgpu::RenderPass<'a>, + ) { + render_pass.set_pipeline(&self.pipeline); + } + /// Configures the current render pass to draw the solid at its offset stored in the /// [DynamicBuffer] at [index]. pub fn configure_render_pass<'a>( @@ -154,7 +161,6 @@ impl Pipeline { render_pass: &mut wgpu::RenderPass<'a>, count: usize, ) { - render_pass.set_pipeline(&self.pipeline); render_pass.set_bind_group( 0, &self.bind_group, |