summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar hatoo <hato2000@gmail.com>2020-06-03 22:01:28 +0900
committerLibravatar hatoo <hato2000@gmail.com>2020-06-03 22:01:28 +0900
commit969de1d31ce7c17f297b2b8abffd071caa562646 (patch)
tree8748665adbb16cc61f45b8926c5d2edb8985e7cd /examples
parent4c494c724435d05d1b46d19bf890a8aaef962b15 (diff)
downloadiced-969de1d31ce7c17f297b2b8abffd071caa562646.tar.gz
iced-969de1d31ce7c17f297b2b8abffd071caa562646.tar.bz2
iced-969de1d31ce7c17f297b2b8abffd071caa562646.zip
Add a comment of how to clear the display to `integration` example
Diffstat (limited to 'examples')
-rw-r--r--examples/integration/src/main.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs
index 6b4aa968..2206d906 100644
--- a/examples/integration/src/main.rs
+++ b/examples/integration/src/main.rs
@@ -163,6 +163,29 @@ pub fn main() {
program.background_color(),
);
+ // If you are using this example and you have no `scene` on your application,
+ // you can clear screen by this code.
+ /*
+ let _ =
+ encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
+ color_attachments: &[
+ wgpu::RenderPassColorAttachmentDescriptor {
+ attachment: &frame.view,
+ resolve_target: None,
+ load_op: wgpu::LoadOp::Clear,
+ store_op: wgpu::StoreOp::Store,
+ clear_color: wgpu::Color {
+ r: 1.0,
+ g: 1.0,
+ b: 1.0,
+ a: 1.0,
+ },
+ },
+ ],
+ depth_stencil_attachment: None,
+ });
+ */
+
// And then iced on top
let mouse_interaction = renderer.backend_mut().draw(
&mut device,