Reuse last set pipeline for triangle in iced_wgpu
This commit is contained in:
parent
99cf98971d
commit
93e309f491
3 changed files with 33 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue