summaryrefslogtreecommitdiffstats
path: root/examples/integration/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/integration/src/main.rs')
-rw-r--r--examples/integration/src/main.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs
index 6b4aa968..db8b4366 100644
--- a/examples/integration/src/main.rs
+++ b/examples/integration/src/main.rs
@@ -154,14 +154,19 @@ pub fn main() {
&wgpu::CommandEncoderDescriptor { label: None },
);
- // We draw the scene first
let program = state.program();
- scene.draw(
- &mut encoder,
- &frame.view,
- program.background_color(),
- );
+ {
+ // We clear the frame
+ let mut render_pass = scene.clear(
+ &frame.view,
+ &mut encoder,
+ program.background_color(),
+ );
+
+ // Draw the scene
+ scene.draw(&mut render_pass);
+ }
// And then iced on top
let mouse_interaction = renderer.backend_mut().draw(