diff options
author | 2022-11-03 05:06:09 +0100 | |
---|---|---|
committer | 2022-11-03 05:06:09 +0100 | |
commit | 93e309f491a8941bafb919e75d660e65071475f4 (patch) | |
tree | 642954d963667d001c3a9fbf4fb7a6b216a58f1e /wgpu/src/triangle/solid.rs | |
parent | 99cf98971dae22ae65adb2104c5a3eec578649f1 (diff) | |
download | iced-93e309f491a8941bafb919e75d660e65071475f4.tar.gz iced-93e309f491a8941bafb919e75d660e65071475f4.tar.bz2 iced-93e309f491a8941bafb919e75d660e65071475f4.zip |
Reuse last set pipeline for `triangle` in `iced_wgpu`
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/triangle/solid.rs | 8 |
1 files changed, 7 insertions, 1 deletions
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, |