summaryrefslogtreecommitdiffstats
path: root/glow
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-21 19:50:53 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-21 19:50:53 +0200
commitbbfb1c040c92e36b3d23a2167ad3432c819b9668 (patch)
tree7fd555e6735d341acd3e5f53e69e4892b26fd18e /glow
parent2798d4935e14a2453adc9e85c1037cac3b79a8c9 (diff)
downloadiced-bbfb1c040c92e36b3d23a2167ad3432c819b9668.tar.gz
iced-bbfb1c040c92e36b3d23a2167ad3432c819b9668.tar.bz2
iced-bbfb1c040c92e36b3d23a2167ad3432c819b9668.zip
Update to latest `glow`
Diffstat (limited to 'glow')
-rw-r--r--glow/Cargo.toml5
-rw-r--r--glow/src/quad.rs23
-rw-r--r--glow/src/triangle.rs14
3 files changed, 17 insertions, 25 deletions
diff --git a/glow/Cargo.toml b/glow/Cargo.toml
index 148f4fd5..f57831bd 100644
--- a/glow/Cargo.toml
+++ b/glow/Cargo.toml
@@ -14,12 +14,15 @@ svg = []
[dependencies]
euclid = "0.20"
-glow = "0.4"
bytemuck = "1.2"
glam = "0.8"
log = "0.4"
glyph_brush = "0.6"
+[dependencies.glow]
+git = "https://github.com/grovesNL/glow"
+rev = "722a850e972a69c3012fcb3687758eacbdac2823"
+
[dependencies.iced_native]
version = "0.2"
path = "../native"
diff --git a/glow/src/quad.rs b/glow/src/quad.rs
index 3a051268..c2fd08a2 100644
--- a/glow/src/quad.rs
+++ b/glow/src/quad.rs
@@ -31,13 +31,11 @@ impl Pipeline {
unsafe {
gl.use_program(Some(program));
- gl.uniform_matrix_4_f32_slice(
- Some(0),
- false,
- &Transformation::identity().into(),
- );
- gl.uniform_1_f32(Some(1), 1.0);
- gl.uniform_1_f32(Some(2), 0.0);
+ let matrix: [f32; 16] = Transformation::identity().into();
+ gl.uniform_matrix_4_f32_slice(Some(&0), false, &matrix);
+
+ gl.uniform_1_f32(Some(&1), 1.0);
+ gl.uniform_1_f32(Some(&2), 0.0);
gl.use_program(None);
}
@@ -80,11 +78,8 @@ impl Pipeline {
if transformation != self.current_transform {
unsafe {
- gl.uniform_matrix_4_f32_slice(
- Some(0),
- false,
- &transformation.into(),
- );
+ let matrix: [f32; 16] = transformation.into();
+ gl.uniform_matrix_4_f32_slice(Some(&0), false, &matrix);
self.current_transform = transformation;
}
@@ -92,7 +87,7 @@ impl Pipeline {
if scale != self.current_scale {
unsafe {
- gl.uniform_1_f32(Some(1), scale);
+ gl.uniform_1_f32(Some(&1), scale);
}
self.current_scale = scale;
@@ -100,7 +95,7 @@ impl Pipeline {
if target_height != self.current_target_height {
unsafe {
- gl.uniform_1_f32(Some(2), target_height as f32);
+ gl.uniform_1_f32(Some(&2), target_height as f32);
}
self.current_target_height = target_height;
diff --git a/glow/src/triangle.rs b/glow/src/triangle.rs
index 3f4aaa1b..489ceaff 100644
--- a/glow/src/triangle.rs
+++ b/glow/src/triangle.rs
@@ -41,11 +41,8 @@ impl Pipeline {
unsafe {
gl.use_program(Some(program));
- gl.uniform_matrix_4_f32_slice(
- Some(0),
- false,
- &Transformation::identity().into(),
- );
+ let transform: [f32; 16] = Transformation::identity().into();
+ gl.uniform_matrix_4_f32_slice(Some(&0), false, &transform);
gl.use_program(None);
}
@@ -177,11 +174,8 @@ impl Pipeline {
unsafe {
if self.current_transform != transform {
- gl.uniform_matrix_4_f32_slice(
- Some(0),
- false,
- &transform.into(),
- );
+ let matrix: [f32; 16] = transform.into();
+ gl.uniform_matrix_4_f32_slice(Some(&0), false, &matrix);
self.current_transform = transform;
}