comparison examples/anmrenderer.rs @ 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 2b2376811f46
comparison
equal deleted inserted replaced
707:987409d48991 708:3954801b6299
1 use luminance::blending::{Equation, Factor}; 1 use luminance::blending::{Equation, Factor};
2 use luminance::context::GraphicsContext; 2 use luminance::context::GraphicsContext;
3 use luminance::framebuffer::Framebuffer; 3 use luminance::framebuffer::Framebuffer;
4 use luminance::pipeline::BoundTexture; 4 use luminance::pipeline::BoundTexture;
5 use luminance::pixel::Floating; 5 use luminance::pixel::NormUnsigned;
6 use luminance::render_state::RenderState; 6 use luminance::render_state::RenderState;
7 use luminance::shader::program::{Program, Uniform}; 7 use luminance::shader::program::{Program, Uniform};
8 use luminance::tess::{Mode, TessBuilder}; 8 use luminance::tess::{Mode, TessBuilder};
9 use luminance::texture::{Dim2, Flat}; 9 use luminance::texture::{Dim2, Flat};
10 use luminance_derive::{Semantics, Vertex, UniformInterface}; 10 use luminance_derive::{Semantics, Vertex, UniformInterface};
79 } 79 }
80 80
81 #[derive(UniformInterface)] 81 #[derive(UniformInterface)]
82 struct ShaderInterface { 82 struct ShaderInterface {
83 // the 'static lifetime acts as “anything” here 83 // the 'static lifetime acts as “anything” here
84 color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, Floating>>, 84 color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, NormUnsigned>>,
85 85
86 #[uniform(name = "mvp")] 86 #[uniform(name = "mvp")]
87 mvp: Uniform<[[f32; 4]; 4]>, 87 mvp: Uniform<[[f32; 4]; 4]>,
88 } 88 }
89 89