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	Sat Aug 24 19:30:59 2019 +0200
+++ b/Cargo.toml	Sun Sep 08 17:47:23 2019 +0200
@@ -14,7 +14,7 @@
 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	Sat Aug 24 19:30:59 2019 +0200
+++ b/examples/anmrenderer.rs	Sun Sep 08 17:47:23 2019 +0200
@@ -2,7 +2,7 @@
 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 @@
 #[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	Sat Aug 24 19:30:59 2019 +0200
+++ b/examples/common.rs	Sun Sep 08 17:47:23 2019 +0200
@@ -37,7 +37,7 @@
                 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 @@
                 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	Sat Aug 24 19:30:59 2019 +0200
+++ b/examples/eclrenderer.rs	Sun Sep 08 17:47:23 2019 +0200
@@ -2,7 +2,7 @@
 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 @@
 #[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	Sat Aug 24 19:30:59 2019 +0200
+++ b/examples/stdrenderer.rs	Sun Sep 08 17:47:23 2019 +0200
@@ -2,7 +2,7 @@
 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 @@
 #[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]>,