diff options
author | 2020-05-29 02:00:28 +0200 | |
---|---|---|
committer | 2020-05-29 02:00:28 +0200 | |
commit | 0cde20b3550ede81bc7ddef628b91eec225aa8af (patch) | |
tree | 56920437979012cceb49718f2dd4ce27d5ba5d40 /examples/integration/src/scene.rs | |
parent | 67b6f044e870df41be92cdc79f571682b97a5d0d (diff) | |
parent | e11b5c614f5bf73c137b8b4f24f56047617527eb (diff) | |
download | iced-0cde20b3550ede81bc7ddef628b91eec225aa8af.tar.gz iced-0cde20b3550ede81bc7ddef628b91eec225aa8af.tar.bz2 iced-0cde20b3550ede81bc7ddef628b91eec225aa8af.zip |
Merge branch 'master' into improvement/update-wgpu_glyph
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, |