changeset 708:3954801b6299

examples: Update to luminance 0.32.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 08 Sep 2019 17:47:23 +0200
parents 987409d48991
children 6d4802abe134
files Cargo.toml examples/anmrenderer.rs examples/common.rs examples/eclrenderer.rs examples/stdrenderer.rs
diffstat 5 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ nom = "5"
 encoding_rs = "0.8"
 image = { version = "0.22", default-features = false, features = ["png_codec"] }
 bitflags = "1"
-luminance = "0.31"
+luminance = "0.32"
 luminance-glfw = { version = "0.6", default-features = false }
 luminance-derive = "0.1"
 
--- a/examples/anmrenderer.rs
+++ b/examples/anmrenderer.rs
@@ -2,7 +2,7 @@ use luminance::blending::{Equation, Fact
 use luminance::context::GraphicsContext;
 use luminance::framebuffer::Framebuffer;
 use luminance::pipeline::BoundTexture;
-use luminance::pixel::Floating;
+use luminance::pixel::NormUnsigned;
 use luminance::render_state::RenderState;
 use luminance::shader::program::{Program, Uniform};
 use luminance::tess::{Mode, TessBuilder};
@@ -81,7 +81,7 @@ struct Vertex {
 #[derive(UniformInterface)]
 struct ShaderInterface {
     // the 'static lifetime acts as “anything” here
-    color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, Floating>>,
+    color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, NormUnsigned>>,
 
     #[uniform(name = "mvp")]
     mvp: Uniform<[[f32; 4]; 4]>,
--- a/examples/common.rs
+++ b/examples/common.rs
@@ -37,7 +37,7 @@ fn load_rgb_png(surface: &mut GlfwSurfac
                 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation");
 
             // the first argument disables mipmap generation (we don’t care so far)
-            tex.upload(GenMipmaps::No, &texels);
+            tex.upload(GenMipmaps::No, &texels).unwrap();
 
             Some(LoadedTexture::Rgb(tex))
         }
@@ -81,7 +81,7 @@ fn load_rgb_a_pngs(surface: &mut GlfwSur
                 Texture::new(surface, [width, height], 0, &Sampler::default()).expect("luminance texture creation");
 
             // the first argument disables mipmap generation (we don’t care so far)
-            tex.upload(GenMipmaps::No, &texels);
+            tex.upload(GenMipmaps::No, &texels).unwrap();
 
             Some(LoadedTexture::Rgba(tex))
         }
--- a/examples/eclrenderer.rs
+++ b/examples/eclrenderer.rs
@@ -2,7 +2,7 @@ use luminance::blending::{Equation, Fact
 use luminance::context::GraphicsContext;
 use luminance::framebuffer::Framebuffer;
 use luminance::pipeline::BoundTexture;
-use luminance::pixel::Floating;
+use luminance::pixel::NormUnsigned;
 use luminance::render_state::RenderState;
 use luminance::shader::program::{Program, Uniform};
 use luminance::tess::{Mode, TessBuilder};
@@ -83,7 +83,7 @@ struct Vertex {
 #[derive(UniformInterface)]
 struct ShaderInterface {
     // the 'static lifetime acts as “anything” here
-    color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, Floating>>,
+    color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, NormUnsigned>>,
 
     #[uniform(name = "mvp")]
     mvp: Uniform<[[f32; 4]; 4]>,
--- a/examples/stdrenderer.rs
+++ b/examples/stdrenderer.rs
@@ -2,7 +2,7 @@ use luminance::blending::{Equation, Fact
 use luminance::context::GraphicsContext;
 use luminance::framebuffer::Framebuffer;
 use luminance::pipeline::BoundTexture;
-use luminance::pixel::Floating;
+use luminance::pixel::NormUnsigned;
 use luminance::render_state::RenderState;
 use luminance::shader::program::{Program, Uniform};
 use luminance::tess::{Mode, TessBuilder, TessSliceIndex};
@@ -90,7 +90,7 @@ struct Vertex {
 #[derive(UniformInterface)]
 struct ShaderInterface {
     // the 'static lifetime acts as “anything” here
-    color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, Floating>>,
+    color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, NormUnsigned>>,
 
     #[uniform(name = "mvp")]
     mvp: Uniform<[[f32; 4]; 4]>,