Export wgpu crate in shader module in iced_widget
This commit is contained in:
parent
91d7df52cd
commit
63f36b0463
8 changed files with 12 additions and 2 deletions
|
|
@ -9,7 +9,6 @@ iced.workspace = true
|
|||
iced.features = ["debug", "advanced"]
|
||||
|
||||
image.workspace = true
|
||||
wgpu.workspace = true
|
||||
bytemuck.workspace = true
|
||||
|
||||
glam.workspace = true
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
use crate::wgpu;
|
||||
|
||||
// A custom buffer container for dynamic resizing.
|
||||
pub struct Buffer {
|
||||
pub raw: wgpu::Buffer,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
use crate::primitive::Vertex;
|
||||
use crate::wgpu;
|
||||
|
||||
use glam::{vec2, vec3, Vec3};
|
||||
use rand::{thread_rng, Rng};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
use crate::wgpu;
|
||||
|
||||
#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)]
|
||||
#[repr(C)]
|
||||
pub struct Vertex {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ use crate::renderer::wgpu::primitive::pipeline;
|
|||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub use crate::renderer::wgpu::wgpu;
|
||||
pub use pipeline::{Primitive, Storage};
|
||||
|
||||
/// A widget which can render custom shaders with Iced's `wgpu` backend.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue