summaryrefslogtreecommitdiffstats
path: root/wgpu/src/target.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-02-10 19:49:08 +0100
committerLibravatar GitHub <noreply@github.com>2020-02-10 19:49:08 +0100
commit5d16f431b3088189579cf096b3abf89578cc73f6 (patch)
treec7efea00fabd87133a59760e902548d39822a844 /wgpu/src/target.rs
parent95880ca74bddb6a23774621ef766b91956d40a61 (diff)
parent4337daddb2a02a2c60dfc5beb896e3059588312a (diff)
downloadiced-5d16f431b3088189579cf096b3abf89578cc73f6.tar.gz
iced-5d16f431b3088189579cf096b3abf89578cc73f6.tar.bz2
iced-5d16f431b3088189579cf096b3abf89578cc73f6.zip
Merge pull request #183 from hecrj/feature/wgpu-integration
Integration with existing `wgpu` projects
Diffstat (limited to 'wgpu/src/target.rs')
-rw-r--r--wgpu/src/target.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/wgpu/src/target.rs b/wgpu/src/target.rs
new file mode 100644
index 00000000..1e72c0c3
--- /dev/null
+++ b/wgpu/src/target.rs
@@ -0,0 +1,14 @@
+use crate::Viewport;
+
+/// A rendering target.
+#[derive(Debug)]
+pub struct Target<'a> {
+ /// The texture where graphics will be rendered.
+ pub texture: &'a wgpu::TextureView,
+
+ /// The viewport of the target.
+ ///
+ /// Most of the time, you will want this to match the dimensions of the
+ /// texture.
+ pub viewport: &'a Viewport,
+}