comparison examples/stdrenderer.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, TessSliceIndex}; 8 use luminance::tess::{Mode, TessBuilder, TessSliceIndex};
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};
88 } 88 }
89 89
90 #[derive(UniformInterface)] 90 #[derive(UniformInterface)]
91 struct ShaderInterface { 91 struct ShaderInterface {
92 // the 'static lifetime acts as “anything” here 92 // the 'static lifetime acts as “anything” here
93 color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, Floating>>, 93 color_map: Uniform<&'static BoundTexture<'static, Flat, Dim2, NormUnsigned>>,
94 94
95 #[uniform(name = "mvp")] 95 #[uniform(name = "mvp")]
96 mvp: Uniform<[[f32; 4]; 4]>, 96 mvp: Uniform<[[f32; 4]; 4]>,
97 97
98 #[uniform(name = "instance_position")] 98 #[uniform(name = "instance_position")]