diff options
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/triangle.rs | 4 | ||||
-rw-r--r-- | wgpu/src/triangle/gradient.rs | 4 | ||||
-rw-r--r-- | wgpu/src/triangle/solid.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs index 791c9833..48ddf28a 100644 --- a/wgpu/src/triangle.rs +++ b/wgpu/src/triangle.rs @@ -12,9 +12,9 @@ use crate::triangle::solid::SolidPipeline; pub use iced_graphics::triangle::{Mesh2D, Vertex2D}; use layer::mesh; +mod solid; mod gradient; mod msaa; -mod solid; /// Triangle pipeline for all mesh layers in a [`iced_graphics::Canvas`] widget. #[derive(Debug)] @@ -60,7 +60,7 @@ impl TrianglePipelines { } impl Pipeline { - /// Creates supported GL programs, listed in [TrianglePipelines]. + /// Creates supported pipelines, listed in [TrianglePipelines]. pub fn new( device: &wgpu::Device, format: wgpu::TextureFormat, diff --git a/wgpu/src/triangle/gradient.rs b/wgpu/src/triangle/gradient.rs index 11c072ca..07551368 100644 --- a/wgpu/src/triangle/gradient.rs +++ b/wgpu/src/triangle/gradient.rs @@ -26,7 +26,7 @@ pub(super) struct GradientUniforms { transform: glam::Mat4, //xy = start, zw = end direction: Vec4, - //x = start, y = end, zw = padding + //x = start stop, y = end stop, zw = padding stop_range: IVec4, } @@ -55,7 +55,7 @@ impl GradientPipeline { ); //Note: with a WASM target storage buffers are not supported. Will need to use UBOs & static - // sized array (eg like the 64-sized array on OpenGL side right now) to make gradients work + // sized array (eg like the 32-sized array on OpenGL side right now) to make gradients work let storage_buffer = DynamicBuffer::storage( device, "iced_wgpu::triangle [GRADIENT] storage", diff --git a/wgpu/src/triangle/solid.rs b/wgpu/src/triangle/solid.rs index d2b4d13b..abba4851 100644 --- a/wgpu/src/triangle/solid.rs +++ b/wgpu/src/triangle/solid.rs @@ -10,13 +10,13 @@ use iced_graphics::Transformation; pub struct SolidPipeline { pipeline: wgpu::RenderPipeline, - pub(crate) buffer: DynamicBuffer<SolidUniforms>, + pub(super) buffer: DynamicBuffer<SolidUniforms>, bind_group_layout: wgpu::BindGroupLayout, bind_group: wgpu::BindGroup, } #[derive(Debug, Clone, Copy, ShaderType)] -pub struct SolidUniforms { +pub(super) struct SolidUniforms { transform: glam::Mat4, color: Vec4, } |