comparison examples/eclrenderer.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};
81 } 81 }
82 82
83 #[derive(UniformInterface)] 83 #[derive(UniformInterface)]
84 struct ShaderInterface { 84 struct ShaderInterface {
85 // the 'static lifetime acts as “anything” here 85 // the 'static lifetime acts as “anything” here
86 color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, Floating>>, 86 color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, NormUnsigned>>,
87 87
88 #[uniform(name = "mvp")] 88 #[uniform(name = "mvp")]
89 mvp: Uniform<[[f32; 4]; 4]>, 89 mvp: Uniform<[[f32; 4]; 4]>,
90 } 90 }
91 91