summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-14 14:04:54 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-14 14:04:54 +0100
commit63f36b04638f14af3455ead8b82d581a438a28a3 (patch)
tree493381fbc949cb69ddc45102674ec5c4635b5e01 /examples
parent91d7df52cdedd1b5c431fdb51a6356e827765b60 (diff)
downloadiced-63f36b04638f14af3455ead8b82d581a438a28a3.tar.gz
iced-63f36b04638f14af3455ead8b82d581a438a28a3.tar.bz2
iced-63f36b04638f14af3455ead8b82d581a438a28a3.zip
Export `wgpu` crate in `shader` module in `iced_widget`
Diffstat (limited to 'examples')
-rw-r--r--examples/custom_shader/Cargo.toml1
-rw-r--r--examples/custom_shader/src/main.rs1
-rw-r--r--examples/custom_shader/src/pipeline.rs4
-rw-r--r--examples/custom_shader/src/primitive.rs1
-rw-r--r--examples/custom_shader/src/primitive/buffer.rs2
-rw-r--r--examples/custom_shader/src/primitive/cube.rs2
-rw-r--r--examples/custom_shader/src/primitive/vertex.rs2
7 files changed, 11 insertions, 2 deletions
diff --git a/examples/custom_shader/Cargo.toml b/examples/custom_shader/Cargo.toml
index 0b8466a9..b602f98d 100644
--- a/examples/custom_shader/Cargo.toml
+++ b/examples/custom_shader/Cargo.toml
@@ -9,7 +9,6 @@ iced.workspace = true
iced.features = ["debug", "advanced"]
image.workspace = true
-wgpu.workspace = true
bytemuck.workspace = true
glam.workspace = true
diff --git a/examples/custom_shader/src/main.rs b/examples/custom_shader/src/main.rs
index e9b6776f..e7b07d78 100644
--- a/examples/custom_shader/src/main.rs
+++ b/examples/custom_shader/src/main.rs
@@ -9,6 +9,7 @@ use crate::pipeline::Pipeline;
use iced::executor;
use iced::time::Instant;
+use iced::widget::shader::wgpu;
use iced::widget::{
checkbox, column, container, row, shader, slider, text, vertical_space,
};
diff --git a/examples/custom_shader/src/pipeline.rs b/examples/custom_shader/src/pipeline.rs
index 44ad17a2..9343e5e0 100644
--- a/examples/custom_shader/src/pipeline.rs
+++ b/examples/custom_shader/src/pipeline.rs
@@ -1,8 +1,10 @@
use crate::primitive;
use crate::primitive::cube;
use crate::primitive::{Buffer, Uniforms};
+use crate::wgpu;
+use crate::wgpu::util::DeviceExt;
+
use iced::{Rectangle, Size};
-use wgpu::util::DeviceExt;
const SKY_TEXTURE_SIZE: u32 = 128;
diff --git a/examples/custom_shader/src/primitive.rs b/examples/custom_shader/src/primitive.rs
index 520ceb8e..f5862ab3 100644
--- a/examples/custom_shader/src/primitive.rs
+++ b/examples/custom_shader/src/primitive.rs
@@ -9,6 +9,7 @@ pub use cube::Cube;
pub use uniforms::Uniforms;
pub use vertex::Vertex;
+use crate::wgpu;
use crate::Camera;
use crate::Pipeline;
diff --git a/examples/custom_shader/src/primitive/buffer.rs b/examples/custom_shader/src/primitive/buffer.rs
index 377ce1bb..ef4c41c9 100644
--- a/examples/custom_shader/src/primitive/buffer.rs
+++ b/examples/custom_shader/src/primitive/buffer.rs
@@ -1,3 +1,5 @@
+use crate::wgpu;
+
// A custom buffer container for dynamic resizing.
pub struct Buffer {
pub raw: wgpu::Buffer,
diff --git a/examples/custom_shader/src/primitive/cube.rs b/examples/custom_shader/src/primitive/cube.rs
index c23f2132..7ece685d 100644
--- a/examples/custom_shader/src/primitive/cube.rs
+++ b/examples/custom_shader/src/primitive/cube.rs
@@ -1,4 +1,6 @@
use crate::primitive::Vertex;
+use crate::wgpu;
+
use glam::{vec2, vec3, Vec3};
use rand::{thread_rng, Rng};
diff --git a/examples/custom_shader/src/primitive/vertex.rs b/examples/custom_shader/src/primitive/vertex.rs
index 6d17aa0f..e64cd926 100644
--- a/examples/custom_shader/src/primitive/vertex.rs
+++ b/examples/custom_shader/src/primitive/vertex.rs
@@ -1,3 +1,5 @@
+use crate::wgpu;
+
#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)]
#[repr(C)]
pub struct Vertex {