summaryrefslogtreecommitdiffstats
path: root/wgpu/src/quad/background_image.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-03-20 11:57:26 +0000
committerLibravatar cel 🌸 <cel@bunny.garden>2025-03-20 11:57:26 +0000
commit27b099c895825ee03555fd7bdaa8cefdb2125ead (patch)
tree4b77fc19db7785884c4a67e85e452bb140e13688 /wgpu/src/quad/background_image.rs
parentbae25b74f68078e5ff74cdae717273cf315d4e90 (diff)
downloadiced-master.tar.gz
iced-master.tar.bz2
iced-master.zip
WIP: background image supportmaster
Diffstat (limited to '')
-rw-r--r--wgpu/src/quad/background_image.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/wgpu/src/quad/background_image.rs b/wgpu/src/quad/background_image.rs
new file mode 100644
index 00000000..b9217686
--- /dev/null
+++ b/wgpu/src/quad/background_image.rs
@@ -0,0 +1,31 @@
+use crate::Buffer;
+use crate::graphics::image;
+use crate::quad::{self, Quad};
+
+use bytemuck::{Pod, Zeroable};
+
+/// A quad filled with a background image.
+#[derive(Clone, Debug)]
+#[repr(C)]
+pub struct BackgroundImage {
+ /// The image data of the quad
+ // TODO: representable image background
+ pub background_image: image::Image,
+
+ /// The [`Quad`] data of the [`BackgroundImage`].
+ pub quad: Quad,
+}
+
+pub struct InnerBackgroundImage {
+ image: image::Image,
+ attachment: Attachment,
+ clip: Sizing,
+}
+
+#[derive(Debug)]
+pub struct Pipeline {
+ pipeline: crate::image::Pipeline,
+ constant_layout: wgpu::BindGroupLayout,
+ layers: Vec<Layer>,
+ prepare_layer: usize,
+}