summaryrefslogtreecommitdiffstats
path: root/examples/integration/src/scene.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-05-28 21:52:34 +0200
committerLibravatar GitHub <noreply@github.com>2020-05-28 21:52:34 +0200
commitd3db055583f4cbef1441fd66d07da70424bd1200 (patch)
tree9f695bd26f688a5aaf3b8fa687a0e3ff096ffe11 /examples/integration/src/scene.rs
parentead4186870d1b46015986f702dd63382498060fc (diff)
parent709ed1f3f7ad8cf67a176763e394aaae4e808e93 (diff)
downloadiced-d3db055583f4cbef1441fd66d07da70424bd1200.tar.gz
iced-d3db055583f4cbef1441fd66d07da70424bd1200.tar.bz2
iced-d3db055583f4cbef1441fd66d07da70424bd1200.zip
Merge pull request #354 from hecrj/feature/glow-renderer
OpenGL renderer and backend-agnostic graphics subcrate
Diffstat (limited to 'examples/integration/src/scene.rs')
-rw-r--r--examples/integration/src/scene.rs6
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,