From d52923f76d265cd8b3e70ee1fc49f52480ed3d89 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 27 Jul 2020 01:44:59 +0200 Subject: [PATCH 1/2] Update to glow 0.5 --- Cargo.toml | 2 +- src/pipeline.rs | 6 +++--- src/pipeline/cache.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4d5e23b..bd1fea1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/glow_glyph" readme = "README.md" [dependencies] -glow = "0.4" +glow = "0.5" glyph_brush = "0.7" log = "0.4" bytemuck = "1.2" diff --git a/src/pipeline.rs b/src/pipeline.rs index 8e8e7b4..37c847c 100644 --- a/src/pipeline.rs +++ b/src/pipeline.rs @@ -54,10 +54,10 @@ impl Pipeline { unsafe { gl.use_program(Some(program)); - gl.uniform_1_i32(Some(sampler), 0); + gl.uniform_1_i32(Some(&sampler), 0); gl.uniform_matrix_4_f32_slice( - Some(transform), + Some(&transform), false, &IDENTITY_MATRIX, ); @@ -90,7 +90,7 @@ impl Pipeline { if self.current_transform != transform { unsafe { gl.uniform_matrix_4_f32_slice( - Some(self.transform), + Some(&self.transform), false, &transform, ); diff --git a/src/pipeline/cache.rs b/src/pipeline/cache.rs index a1c52f3..81f66c8 100644 --- a/src/pipeline/cache.rs +++ b/src/pipeline/cache.rs @@ -66,7 +66,7 @@ impl Cache { gl.bind_texture(glow::TEXTURE_2D, Some(self.texture)); - gl.tex_sub_image_2d_u8_slice( + gl.tex_sub_image_2d( glow::TEXTURE_2D, 0, i32::from(offset_x), @@ -75,7 +75,7 @@ impl Cache { i32::from(height), glow::RED, glow::UNSIGNED_BYTE, - Some(data), + glow::PixelUnpackData::Slice(data), ); gl.bind_texture(glow::TEXTURE_2D, None); From dd0057ee803a8343b2377fbb7c1f3ce17f60db06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Mon, 27 Jul 2020 22:41:58 +0200 Subject: [PATCH 2/2] Update `CHANGELOG` --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e37d3d0..3558c31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- `glow` updated to `0.5`. [#2] + +[#2]: https://github.com/hecrj/glow_glyph/pull/2 + ## [0.2.1] - 2020-06-27 ### Fixed