diff options
Diffstat (limited to '')
-rw-r--r-- | glow/src/triangle.rs | 14 |
1 files changed, 4 insertions, 10 deletions
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; } |