diff options
author | 2022-12-02 21:10:44 +0100 | |
---|---|---|
committer | 2022-12-02 21:10:44 +0100 | |
commit | 91d5516474dcb9494987f264783ad1400781b025 (patch) | |
tree | 11376e29c3c1358f7576e502366a990db9fb1c08 /glow/src/quad | |
parent | da244ff8048e0b339c1502372894a2460a637241 (diff) | |
parent | 60e41666d0e203d9777de981121c39f569bc3a7b (diff) | |
download | iced-91d5516474dcb9494987f264783ad1400781b025.tar.gz iced-91d5516474dcb9494987f264783ad1400781b025.tar.bz2 iced-91d5516474dcb9494987f264783ad1400781b025.zip |
Merge pull request #1506 from rksm/non-uniform-border-radius-for-quads
non uniform border radius for quads
Diffstat (limited to 'glow/src/quad')
-rw-r--r-- | glow/src/quad/compatibility.rs | 8 | ||||
-rw-r--r-- | glow/src/quad/core.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/glow/src/quad/compatibility.rs b/glow/src/quad/compatibility.rs index 28a5ea7c..e909162c 100644 --- a/glow/src/quad/compatibility.rs +++ b/glow/src/quad/compatibility.rs @@ -254,7 +254,7 @@ unsafe fn create_buffers( gl.enable_vertex_attrib_array(4); gl.vertex_attrib_pointer_f32( 4, - 1, + 4, glow::FLOAT, false, stride, @@ -268,7 +268,7 @@ unsafe fn create_buffers( glow::FLOAT, false, stride, - 4 * (2 + 2 + 4 + 4 + 1), + 4 * (2 + 2 + 4 + 4 + 4), ); gl.enable_vertex_attrib_array(6); @@ -278,7 +278,7 @@ unsafe fn create_buffers( glow::FLOAT, false, stride, - 4 * (2 + 2 + 4 + 4 + 1 + 1), + 4 * (2 + 2 + 4 + 4 + 4 + 1), ); gl.bind_vertex_array(None); @@ -307,7 +307,7 @@ pub struct Vertex { pub border_color: [f32; 4], /// The border radius of the [`Vertex`]. - pub border_radius: f32, + pub border_radius: [f32; 4], /// The border width of the [`Vertex`]. pub border_width: f32, diff --git a/glow/src/quad/core.rs b/glow/src/quad/core.rs index 16bec385..89036530 100644 --- a/glow/src/quad/core.rs +++ b/glow/src/quad/core.rs @@ -218,7 +218,7 @@ unsafe fn create_instance_buffer( gl.enable_vertex_attrib_array(4); gl.vertex_attrib_pointer_f32( 4, - 1, + 4, glow::FLOAT, false, stride, @@ -233,7 +233,7 @@ unsafe fn create_instance_buffer( glow::FLOAT, false, stride, - 4 * (2 + 2 + 4 + 4 + 1), + 4 * (2 + 2 + 4 + 4 + 4), ); gl.vertex_attrib_divisor(5, 1); |