diff options
Diffstat (limited to 'examples/integration/src/scene.rs')
-rw-r--r-- | examples/integration/src/scene.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/integration/src/scene.rs b/examples/integration/src/scene.rs index 22c6812a..b79a7ff4 100644 --- a/examples/integration/src/scene.rs +++ b/examples/integration/src/scene.rs @@ -2,7 +2,6 @@ use iced_wgpu::wgpu; use iced_winit::Color; pub struct Scene { - pub background_color: Color, pipeline: wgpu::RenderPipeline, bind_group: wgpu::BindGroup, } @@ -12,7 +11,6 @@ impl Scene { let (pipeline, bind_group) = build_pipeline(device); Scene { - background_color: Color::BLACK, pipeline, bind_group, } @@ -22,6 +20,7 @@ impl Scene { &self, encoder: &mut wgpu::CommandEncoder, target: &wgpu::TextureView, + background_color: Color, ) { let mut rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { @@ -32,8 +31,7 @@ impl Scene { load_op: wgpu::LoadOp::Clear, store_op: wgpu::StoreOp::Store, clear_color: { - let [r, g, b, a] = - self.background_color.into_linear(); + let [r, g, b, a] = background_color.into_linear(); wgpu::Color { r: r as f64, |