summaryrefslogtreecommitdiffstats
path: root/wgpu/src/quad.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-01-09 18:46:06 +0100
committerLibravatar GitHub <noreply@github.com>2020-01-09 18:46:06 +0100
commit0a8302450557877cb667b51fc84383aaf0a11b02 (patch)
treefe3a8a6b0ae82f7fd1fa0c0de34b4b09d0b9edda /wgpu/src/quad.rs
parent6699329d3f91c5b9d8e8e55ad88de24bd3894955 (diff)
parent7b278755fc7929633b5771824beac4d39b16e82e (diff)
downloadiced-0a8302450557877cb667b51fc84383aaf0a11b02.tar.gz
iced-0a8302450557877cb667b51fc84383aaf0a11b02.tar.bz2
iced-0a8302450557877cb667b51fc84383aaf0a11b02.zip
Merge pull request #146 from hecrj/feature/custom-styling
Custom styling
Diffstat (limited to 'wgpu/src/quad.rs')
-rw-r--r--wgpu/src/quad.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs
index c292dec3..fe3276a3 100644
--- a/wgpu/src/quad.rs
+++ b/wgpu/src/quad.rs
@@ -125,9 +125,19 @@ impl Pipeline {
},
wgpu::VertexAttributeDescriptor {
shader_location: 4,
- format: wgpu::VertexFormat::Float,
+ format: wgpu::VertexFormat::Float4,
offset: 4 * (2 + 2 + 4),
},
+ wgpu::VertexAttributeDescriptor {
+ shader_location: 5,
+ format: wgpu::VertexFormat::Float,
+ offset: 4 * (2 + 2 + 4 + 4),
+ },
+ wgpu::VertexAttributeDescriptor {
+ shader_location: 6,
+ format: wgpu::VertexFormat::Float,
+ offset: 4 * (2 + 2 + 4 + 4 + 1),
+ },
],
},
],
@@ -233,7 +243,8 @@ impl Pipeline {
bounds.x,
bounds.y,
bounds.width,
- bounds.height,
+ // TODO: Address anti-aliasing adjustments properly
+ bounds.height + 1,
);
render_pass.draw_indexed(
@@ -277,7 +288,9 @@ pub struct Quad {
pub position: [f32; 2],
pub scale: [f32; 2],
pub color: [f32; 4],
+ pub border_color: [f32; 4],
pub border_radius: f32,
+ pub border_width: f32,
}
impl Quad {