diff options
author | 2020-07-31 02:48:01 +0200 | |
---|---|---|
committer | 2020-07-31 02:48:01 +0200 | |
commit | 869fa6baa81b1e5fa52bec7f4d02ddf7e29167ff (patch) | |
tree | 907ca3b4fb143166ef88030fec5d9543d6260ded | |
parent | 4ab9992bf8636937ed3b0b557f084a2d1fedfd8a (diff) | |
parent | 795da598e0096ce557076db5f76c036290714188 (diff) | |
download | iced-869fa6baa81b1e5fa52bec7f4d02ddf7e29167ff.tar.gz iced-869fa6baa81b1e5fa52bec7f4d02ddf7e29167ff.tar.bz2 iced-869fa6baa81b1e5fa52bec7f4d02ddf7e29167ff.zip |
Merge pull request #462 from hecrj/improvement/update-glow
Update `glow` to `0.5` in `iced_glow`
-rw-r--r-- | glow/Cargo.toml | 4 | ||||
-rw-r--r-- | glow/src/quad.rs | 12 | ||||
-rw-r--r-- | glow/src/triangle.rs | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/glow/Cargo.toml b/glow/Cargo.toml index baf2eb2f..f1f491b3 100644 --- a/glow/Cargo.toml +++ b/glow/Cargo.toml @@ -15,8 +15,8 @@ image = [] svg = [] [dependencies] -glow = "0.4" -glow_glyph = "0.2" +glow = "0.5" +glow_glyph = "0.3" glyph_brush = "0.7" euclid = "0.20" bytemuck = "1.2" diff --git a/glow/src/quad.rs b/glow/src/quad.rs index 3a65338a..a8fbb9e5 100644 --- a/glow/src/quad.rs +++ b/glow/src/quad.rs @@ -48,13 +48,13 @@ impl Pipeline { let matrix: [f32; 16] = Transformation::identity().into(); gl.uniform_matrix_4_f32_slice( - Some(transform_location), + Some(&transform_location), false, &matrix, ); - gl.uniform_1_f32(Some(scale_location), 1.0); - gl.uniform_1_f32(Some(screen_height_location), 0.0); + gl.uniform_1_f32(Some(&scale_location), 1.0); + gl.uniform_1_f32(Some(&screen_height_location), 0.0); gl.use_program(None); } @@ -102,7 +102,7 @@ impl Pipeline { unsafe { let matrix: [f32; 16] = transformation.into(); gl.uniform_matrix_4_f32_slice( - Some(self.transform_location), + Some(&self.transform_location), false, &matrix, ); @@ -113,7 +113,7 @@ impl Pipeline { if scale != self.current_scale { unsafe { - gl.uniform_1_f32(Some(self.scale_location), scale); + gl.uniform_1_f32(Some(&self.scale_location), scale); } self.current_scale = scale; @@ -122,7 +122,7 @@ impl Pipeline { if target_height != self.current_target_height { unsafe { gl.uniform_1_f32( - Some(self.screen_height_location), + Some(&self.screen_height_location), target_height as f32, ); } diff --git a/glow/src/triangle.rs b/glow/src/triangle.rs index eefd1c1f..9202bcb2 100644 --- a/glow/src/triangle.rs +++ b/glow/src/triangle.rs @@ -44,7 +44,7 @@ impl Pipeline { let transform: [f32; 16] = Transformation::identity().into(); gl.uniform_matrix_4_f32_slice( - Some(transform_location), + Some(&transform_location), false, &transform, ); @@ -182,7 +182,7 @@ impl Pipeline { if self.current_transform != transform { let matrix: [f32; 16] = transform.into(); gl.uniform_matrix_4_f32_slice( - Some(self.transform_location), + Some(&self.transform_location), false, &matrix, ); |